Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
ykishore

Active 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
References
radhakrishnan82

Senior Member


Joined: 31 Mar 2005
Posts: 386
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: 4684
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1