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
 

 

Syncsort->convert Packed Julian Date (CCYYDDD) to mmddyyy

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Thu Jul 31, 2008 1:57 am    Post subject: Syncsort->convert Packed Julian Date (CCYYDDD) to mmddyyy
Reply with quote

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
View user's profile Send private message

Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Aug 01, 2008 1:01 am    Post subject:
Reply with quote

This feature is available in SyncSort for z/OS 1.3 via OUTREC DT or OUTREC DTNS.
Back to top
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Fri Aug 01, 2008 8:07 pm    Post subject: Reply to: Syncsort->convert Packed Julian Date (CCYYDDD)
Reply with quote

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
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Sat Aug 02, 2008 2:26 am    Post subject: Reply to: Syncsort->convert Packed Julian Date (CCYYDDD)
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sat Aug 02, 2008 3:10 am    Post subject:
Reply with quote

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
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Mon Aug 04, 2008 5:48 pm    Post subject: Reply to: Syncsort->convert Packed Julian Date (CCYYDDD)
Reply with quote

I have input as

Code:
abcdefgh19880051989006pqrs
abcdefgg20000072001008abcc


I got output as
Code:
abcdefgh19010520881901062089pqrs
abcdefgg20010721002001082101abcc


I need output as

Code:
abcdefgh0105198801061989pqrs
abcdefgg0107200001082001abcc
Back to top
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Tue Aug 05, 2008 2:58 am    Post subject: Reply to: Syncsort->convert Packed Julian Date (CCYYDDD)
Reply with quote

There is a small correction to the required output format.

Code:
abcdefgh01/05/198801/06/1989pqrs
abcdefgg01/07/200001/08/2001abcc
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Aug 05, 2008 6:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mturangi

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Thu Aug 07, 2008 9:52 pm    Post subject: Reply to: Syncsort->convert Packed Julian Date (CCYYDDD)
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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