View previous topic :: View next topic
|
Author |
Message |
killer
New User
Joined: 16 Sep 2005 Posts: 2
|
|
|
|
Hi all
I'd like to know if/how it is possible to use DFSORT/ICETOOL to just determine if a dataset is sorted or not, and then give a suitable returncode. I'd like to invoke the sort from JCL.
regards
Killer |
|
Back to top |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
Sort the input file in the order you expect it be sorted and then compare the original file and sorted file using SUPERC. SUPERC reports differences even if the order of the records are different.
If RC=1, then the input file was not sorted, if RC=0, then the input file was sorted. |
|
Back to top |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
Killer,
If the file is sorted you will have RC=0, if not RC=16
Code: |
//STEP0001 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SORTIN01 DD *
02
03
01
/*
//SYSIN DD *
MERGE FIELDS=(1,2,ZD,A)
/*
|
Alain |
|
Back to top |
|
|
|