View previous topic :: View next topic |
Author |
Message |
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Tue Jan 18, 2005 11:24 am Post subject: Simple way to know if records in sort order? |
|
|
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 |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Tue Jan 18, 2005 1:04 pm Post subject: |
|
|
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
_________________ 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 |
|
|
Dinesh.G Beginner
Joined: 18 Jan 2005 Posts: 9 Topics: 2
|
Posted: Mon Jan 24, 2005 3:40 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Dinesh.G Beginner
Joined: 18 Jan 2005 Posts: 9 Topics: 2
|
Posted: Tue Jan 25, 2005 12:49 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Jan 25, 2005 6:41 am Post subject: |
|
|
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
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|