Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us