View previous topic :: View next topic
|
Author |
Message |
ABaluchamy
New User
Joined: 29 Dec 2006 Posts: 34 Location: INDIA
|
|
|
|
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 |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Posting the sysout info from the sort would help. . . |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
|
|