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

Sort on Centuary!!!!


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 435
Location: chennai, India

PostPosted: Tue Sep 20, 2005 3:06 pm
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 Developer


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

PostPosted: Fri Sep 23, 2005 2:54 am
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:

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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Alternative of JoinKeys in SORT DFSORT/ICETOOL 2
No new posts Sort SMF records? SYNCSORT 6
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Simplify SORT CARD to combine INREC a... DFSORT/ICETOOL 6
No new posts Sort card to generate the DSN DFSORT/ICETOOL 17
Search our Forums:


Back to Top