Syncsort - Convert Julian Date to Gregorian Date.



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Syncsort - Convert Julian Date to Gregorian Date.

Postby ranga_subham » Sat Jan 09, 2010 2:02 am

Hi,

Please help me to convert a Julian date to Gregorian date using Syncsort.

Input format:
2009001
2010001


Ouput:
2009-01-01
2010-01-01


Is this achievable using Syncsort v1.3?

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - Convert Julian Date to Gregorian Date.

 

Re: Syncsort - Convert Julian Date to Gregorian Date.

Postby Alissa Margulies » Sat Jan 09, 2010 2:56 am

Here is a SyncSort for z/OS 1.3 job that will do what you asked:
//SORT1 EXEC PGM=SORT,PARM='CENTWIN=80'
//SORTIN  DD *                             
2009001
2010001
//SORTOUT DD SYSOUT=*                     
//SYSOUT  DD SYSOUT=*                       
//SYSIN   DD *                               
  INREC BUILD=(3,5,Y2T,DT=(4MD-))         
  SORT FIELDS=COPY                         
/*   
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Syncsort - Convert Julian Date to Gregorian Date.

Postby ranga_subham » Sun Jan 10, 2010 6:00 pm

Hi,

Thank you. Can you please help me to understand the SYSIN card?

Why we are choosing starting position from 3rd column and length 5 here when actual value starts at 1st column?

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - Convert Julian Date to Gregorian Date.

Postby Alissa Margulies » Mon Jan 11, 2010 9:26 pm

ranga_subham wrote:Why we are choosing starting position from 3rd column and length 5 here when actual value starts at 1st column?

Y2T data format processes dates with a 2-digit year. Therefore, it is not necessary to specify the first 2 positions of the 4-digit year. The century is then processed based on your CENTWIN option (either your installation default or runtime parameter). Since I did not know how your CENTWIN installation option is configured at your site, I specified CENTWIN=80 as a runtime PARM, which will give you a century window between 1930-2029. For more details regarding CENTWIN processing, please refer to Chapter 5 in the SyncSort for z/OS 1.3 Programmer's Guide for complete details of the PARM Options.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Syncsort - Convert Julian Date to Gregorian Date.

Postby ranga_subham » Mon Jan 11, 2010 9:35 pm

Thanks you for the details.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post