IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to know the given file is in sorted order


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 04, 2010 4:13 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 04, 2010 4:17 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top