View previous topic :: View next topic
|
Author |
Message |
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
I have 2 Packed Julian date fields consecutively starting at positions 9 and 13 respectively in a VSAM file. My requirement is to copy the entire VSAM file (total length 41) to a flat file but convert the Packed Julian date (CCYYDDD) to Gregorian Date (MMDDCCYY). Please help me on this.
We are using Syncsort version 1.3.0.0N.
Thank You. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
This feature is available in SyncSort for z/OS 1.3 via OUTREC DT or OUTREC DTNS. |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
I searched SYNCSORT Version 1.3 Manual. I could not find format CCYYDDD as input date filed. I could see YYDDD format only. |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
Since I could not find CCYYDDD as input format. I ignored CC portion and wanted to test X'yyddds' format.
I used following sort statements.
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(10,3,Y2U,DTNS=(MD4)) |
The job ran fine. But Output got messed up. In My input file I was having date '88005' (though I was having 19 as CC at 9th Position in Packed Decimal format) in packed decimal format. I got the output as 01052088.
It should have been 01051988.
Could you please let me know how to correct this situation. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post a few input records, the output produced from those records and the output you wanted rather than what was produced.
Please use the "Code" tag for each set of records. You can use Preview to see how your post will appear to the forum before you Submit. |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
I have input as
Code: |
abcdefgh19880051989006pqrs
abcdefgg20000072001008abcc |
I got output as
Code: |
abcdefgh19010520881901062089pqrs
abcdefgg20010721002001082101abcc |
I need output as
Code: |
abcdefgh0105198801061989pqrs
abcdefgg0107200001082001abcc |
|
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
There is a small correction to the required output format.
Code: |
abcdefgh01/05/198801/06/1989pqrs
abcdefgg01/07/200001/08/2001abcc |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello muralee.
Quote: |
I got the output as 01052088.
It should have been 01051988.
Could you please let me know how to correct this situation. |
See the manual for CENTWIN parameter. It will allow you to define your own rules while converting 2 digit year to 4 digit year. It can be specified as a parm or in the control card itself.
Thanks,
Arun |
|
Back to top |
|
|
mturangi
New User
Joined: 26 Jul 2008 Posts: 15 Location: Jefferson city, MO, USA
|
|
|
|
Thank You Arun.
The following code worked for me.
Code: |
SORT FIELDS=COPY,
CENTWIN=1949
OUTREC FIELDS=(10,3,Y2U,DT=(MD4/)) |
I am surprised to know that Latest Syncsort version also doesn't have
the CCYYDDD format for the input Date criteria and we have to use CENTWIN command to tackle this.
Thank You All for helping me to resolve this problem. |
|
Back to top |
|
|
|