Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to know the given file is in sorted order

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
amargallani

New User


Joined: 04 May 2010
Posts: 5
Location: ballarpur

PostPosted: Fri Jun 04, 2010 4:09 pm    Post subject: How to know the given file is in sorted order
Reply with quote

I have a file and I want to know the file is in sorted order. I can do this by opening a file in view mode and type SORT on the command line the it will give if it is file already in sorted order

I have 300+ files and i dont want to do it manually, I thought of this solution:

1.Sort the FILEA into PDS FILEA.SORT
2. Compare the Original FileA with FILA.SORT
3. If ther is a no mismatch the file is already in sorted order
else file is not in sorted order.

I need a help in comparing FILEA and FILE.SORT, can any body tell me if there is any command which can do this compare
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Jun 04, 2010 4:13 pm    Post subject: Reply to: How to know the given file is in sorted order
Reply with quote

the requirement is quite obscure!

if You need the file to be sorted just sort it and get rid of the unsorted one

but on the other hand
if it is not sorted what are You going to do about it ?
waiting for an explanation
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jun 04, 2010 4:14 pm    Post subject:
Reply with quote

well,
since you are going to sort them anyway for your compare,
I would suggest skipping the compare
and just sort them all, and change names if necessary.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Jun 04, 2010 4:17 pm    Post subject: Reply to: How to know the given file is in sorted order
Reply with quote

the ts was explaining the intended process
sort the unknown_state_file and compare the sorted with the original
if they match literally the original is sorted
convoluted thinking huh?!
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us