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
 

 

Sort on Centuary!!!!

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

New User


Joined: 12 Aug 2005
Posts: 53
Location: USA

PostPosted: Tue Sep 20, 2005 1:57 pm    Post subject: Sort on Centuary!!!!
Reply with quote

Hi

Here is my requirement!!

i've a file which has DATE column.but it doesnt have centuary part!!! here i want to sort the date on ascending order!!!!

for eg:

Input:
---------
0512
0510
9501
9201
9911

if i sort the above date col on ascending order, i do get the output as below!!!

output:
----------------
0501
0510
0512
9201
9501
9911

but when we consider year wise result may be wrong...so i want the output as below.

output:
--------
9201
9501
9911
0501
0510
0512

so can you guys provide me the JCL for the same!!! i know that we can do this by adding centuary part to the year.but is there anyother ways do it!!!!
Back to top
View user's profile Send private message

radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Tue Sep 20, 2005 3:06 pm    Post subject:
Reply with quote

kishore,

Use this condition in sort

Code:
SORT FIELDS=(1,6,Y2T,A),CENTWIN=1950


hope this helps.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Sep 23, 2005 2:54 am    Post subject:
Reply with quote

Actually, since the input has yymm dates, the correct DFSORT statements would be:

Code:

   OPTION Y2PAST=1950
   SORT FIELDS=(1,4,Y2T,A)


For more information on DFSORT's Year2000 features, see:

http://www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/srtmay2k.html
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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