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

ToConvert the below date format using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nvsnaidu

New User


Joined: 09 Nov 2007
Posts: 7
Location: Chennai

PostPosted: Fri Nov 09, 2007 2:11 pm
Reply with quote

How to convert a source date of say 2007310 i.e CCYYJULIANDATE to target date CYYMMDD and target date should occupy 4 bytes
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Nov 09, 2007 3:11 pm
Reply with quote

Venkat,

This was discussed earlier. Go thru the link-

ibmmainframes.com/about7034.html
Back to top
View user's profile Send private message
nvsnaidu

New User


Joined: 09 Nov 2007
Posts: 7
Location: Chennai

PostPosted: Fri Nov 09, 2007 4:30 pm
Reply with quote

Thanks a lot murmohk1
Back to top
View user's profile Send private message
nvsnaidu

New User


Joined: 09 Nov 2007
Posts: 7
Location: Chennai

PostPosted: Sat Nov 10, 2007 1:53 pm
Reply with quote

My date is of type 9(07) i.e '2007310' . so i converted that date first to PD
date of lenght 4 and then got the required output date of format PD and lenght 4 i.e 0071109

The below is the sort card.

Code:

  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=INIT,                                           
       BUILD=(1,7,ZD,TO=PD,LENGTH=4)),                               
     IFTHEN=(WHEN=INIT,                                           
       BUILD=(1:1,1,CHANGE=(1,X'19',X'00',X'20',X'01'),             
         NOMATCH=(X'02'),2:2,3))                                       
  OUTREC FIELDS=(1,4,DT1,TO=PD,LENGTH=4)                             


Thanks a lot to Frank Yaeger & Murmohk1
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Sat Nov 10, 2007 2:06 pm
Reply with quote

Venkat,

You are welcome.
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 Nov 20, 2009 11:29 pm
Reply with quote

With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), DFSORT now has built-in date conversion functions. For complete details on date conversion functions and the other new functions available with the Nov, 2009 DFSORT PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top