Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to determine whether a dataset is sorted or not?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
killer

New User


Joined: 16 Sep 2005
Posts: 3

PostPosted: Fri Sep 16, 2005 11:22 am    Post subject: How to determine whether a dataset is sorted or not?
Reply with quote

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
View user's profile Send private message

mallikiran

New User


Joined: 07 Sep 2005
Posts: 49

PostPosted: Fri Sep 16, 2005 9:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Sun Sep 18, 2005 2:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us