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
 
ToConvert the below date format using DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: ToConvert the below date format using DFSORT
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: 1439
Location: Bangalore,India

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

Venkat,

This was discussed earlier. Go thru the link-

http://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    Post subject: Reply to: ToConvert the below date format using DFSORT
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    Post subject: Reply to: ToConvert the below date format using DFSORT
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: 1439
Location: Bangalore,India

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

Venkat,

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

http://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    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 Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm

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