Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2287
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 Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us