View previous topic :: View next topic
|
Author |
Message |
nvsnaidu
New User
Joined: 09 Nov 2007 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
Back to top |
|
|
nvsnaidu
New User
Joined: 09 Nov 2007 Posts: 7 Location: Chennai
|
|
|
|
Thanks a lot murmohk1 |
|
Back to top |
|
|
nvsnaidu
New User
Joined: 09 Nov 2007 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Venkat,
You are welcome. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|