MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple way to know if records in sort order?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
dtf
Beginner


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Tue Jan 18, 2005 11:24 am    Post subject: Simple way to know if records in sort order? Reply with quote

In ISPF, if I use the sort command, and the records are already in "Sort Sequence", I get a message telling me so. Is there a simple way within DFSORT/SYNCSORT, to know the same?

I suppose I could do a file compare between the SORTIN file and SORTOUT file, but this seems like a bit of overkill and not very efficient.

DTF
________
Giugiaro Mustang


Last edited by dtf on Tue Feb 01, 2011 1:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Jan 18, 2005 1:04 pm    Post subject: Reply with quote

With DFSORT, you could do a one-file (SORTIN01) MERGE like this:

Code:

//CKSEQ EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN01 DD DSN=...  input file
//SORTOUT  DD DUMMY
//SYSIN    DD    *
   MERGE FIELDS=(p,m,f,A)
/*


If the file is in sequence, you'll get return code 0. If the file is not in sequence, you'll get return code 16 and the following error message:

ICE068A 0 OUT OF SEQUENCE SORTIN01

Code:



_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dinesh.G
Beginner


Joined: 18 Jan 2005
Posts: 9
Topics: 2

PostPosted: Mon Jan 24, 2005 3:40 am    Post subject: Reply with quote

Is there any Way to check whether the Input file is Sorted or not
by the DFSORT/SyncSort using (Exec PGM=SORT).


Thanks & Rgds
Dinesh Kumar
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Mon Jan 24, 2005 9:09 am    Post subject: Reply with quote

Quote:

Is there any Way to check whether the Input file is Sorted or not
by the DFSORT/SyncSort using (Exec PGM=SORT).


Dinesh,

The example shown by frank is indeed the way to check whether the input file is sorted or not. check this link for a detailed explanation of ICEMAN/SORT

http://www.mvsforums.com/helpboards/viewtopic.php?t=2504&highlight=iceman+alias

Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dinesh.G
Beginner


Joined: 18 Jan 2005
Posts: 9
Topics: 2

PostPosted: Tue Jan 25, 2005 12:49 am    Post subject: Reply with quote

Thanks Kolusu for the Link which You have sent, but the problem which i face while submitting the Job as given by Frank is that the
PGM=ICEMAN invokes the SyncSort Utility and If the file is in sequence, I am getting a return code 0. When the file is not in sequence, I am getting the following error message:
WER068A OUT OF SEQ SORTIN01 , BLOCK 1
and the Job is abending rather than giving a return code of 16 .How can I avert my job from abending when the File is not in sequence and have some return code other than zero.

Thanks & Rgds
Dinesh
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Tue Jan 25, 2005 6:41 am    Post subject: Reply with quote

Dinesh,

Add the parm NORC16 to your step and rerun the job. Now the job will not abend, but will complete successfully with a return code of 16.

Code:

//STEP0100 EXEC PGM=ICEMAN,PARM='NORC16'


Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group