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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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