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

How to convert gregorian date to julian


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

New User


Joined: 29 Dec 2006
Posts: 34
Location: INDIA

PostPosted: Thu Jun 17, 2010 8:24 pm
Reply with quote

Hi,

I have date in the input file of format C'YYYYMMDD' How to convert this into Julian date as C'YYYYDDD'

Please help me out.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Jun 17, 2010 9:00 pm
Reply with quote

See if this works for you. For some strange reason its showing Blank output for me.

Could someone please correct me if its wrong? I used latest DFSort Manual to get this example.


Code:
//SORT01   EXEC PGM=SORT                       
//SORTIN   DD *                               
20100110                                       
//SORTOUT  DD  SYSOUT=*                       
//SYSIN    DD *                               
 SORT FIELDS=COPY                             
 OUTREC BUILD=(01,08,Y4T,TOJUL=Y4U)           
/*                                             
//SYSOUT DD SYSOUT=*                           


Thanks,
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 17, 2010 9:10 pm
Reply with quote

Hello,

Posting the sysout info from the sort would help. . .
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Jun 17, 2010 9:12 pm
Reply with quote

ABaluchamy,

Use the following DFSORT JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT               
//SYSOUT   DD SYSOUT=*                 
//SORTIN   DD *                         
20100609                               
20100617                               
//SORTOUT  DD SYSOUT=*                 
//SYSIN    DD *                         
  SORT FIELDS=COPY                     
  INREC OVERLAY=(10:1,8,Y4T,TOJUL=Y4T) 
//*



The output from this job is

Code:

20100609 2010160
20100617 2010168                                 


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

Quote:

See if this works for you. For some strange reason its showing Blank output for me.

Could someone please correct me if its wrong? I used latest DFSort Manual to get this example.


Sqlcode1,

I do understand that you are eager to help , but please understand the features before you can help. It only adds confusion by posting something which you think does not work even though it works as it is supposed to work. OP wanted a Julian date in CHARACTER format which is the Y4T format(C'ccyyddd'). Y4U is a packed decimal format(P'ccyyddd') which you cannot read unless you turn on the hex format.
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top