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
 

 

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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


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