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: 10256
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: 6967
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: 10256
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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