IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Date conversion from Gregorian to Julian


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Tue Sep 27, 2011 10:38 am
Reply with quote

Hello All,

My shop uses SYNCSORT Z/OS 1.3 and I want to convert a Gregorian date to Julian date. Can somebody suggest any what date conversion function should I use?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 27, 2011 11:59 am
Reply with quote

Do you have your trusty manual available? Look up Gregorian, Julian, and I think you'll find something. I don't have a manual for SyncSort.
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Tue Sep 27, 2011 12:07 pm
Reply with quote

I also do not have the manual and syncsort have not published any manuals for public reading. That is the reason I have posted this question.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 27, 2011 12:12 pm
Reply with quote

forums are not a manual reading/providing service for disorganized organizations...

since Your (dis)organization is licensed for it, the documentation is stored somewhere,

have Your <powers> manage to make it available to those who need it
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Sep 27, 2011 5:58 pm
Reply with quote

I don't see anything listed in the manual (it would be described in the OUTREC section), only the conversion from Julian to Gregorian.

I'd suggest that you contact Syncsort directly.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 27, 2011 6:11 pm
Reply with quote

Quick search it looks like Syncsort MFX for z/OS 1.4 has it as a new feature.

Kevin is on the button, and TS is out of luck as well as manuals.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Sep 27, 2011 6:23 pm
Reply with quote

Actually, I just found a similar topic and a response from Alissa Marguiles from Syncsort. For her example, the gregorian date is in the first 8 positions (YYYYMMDD), and the julian date overlays that field, padded out with 3 blanks spaces:

Code:

//STEP1    EXEC PGM=SORT
//SORTIN   DD DSN=INPUT.RECORDS
//SORTOUT  DD DSN=OUTPUT.RECORDS
//SYSOUT   DD SYSOUT=*
//SYSIN DD *
 OPTION COPY                                               
 INREC IFTHEN=(WHEN=INIT,                                   
       OVERLAY=(81:01,04,ZD,MOD,+4,EDIT=(T),               
                82:01,04,ZD,MOD,+100,EDIT=(TTT),           
                85:01,04,ZD,MOD,+400,EDIT=(TTT)),HIT=NEXT),
      IFTHEN=(WHEN=(85,3,ZD,EQ,0,OR,                       
                     (81,1,ZD,EQ,0,AND,82,3,ZD,GT,0)),     
       OVERLAY=(88:C'L'),HIT=NEXT),                         
        IFTHEN=(WHEN=(05,02,ZD,EQ,01),                     
       OVERLAY=(13:3,2,7,2,ZD,EDIT=(TTT))),                 
        IFTHEN=(WHEN=(05,02,ZD,EQ,02),                     
       OVERLAY=(13:3,2,+031,ADD,07,02,ZD,EDIT=(TTT))),     
        IFTHEN=(WHEN=(05,02,ZD,EQ,03),                     
       OVERLAY=(13:3,2,+059,ADD,07,02,ZD,EDIT=(TTT))),     
        IFTHEN=(WHEN=(05,02,ZD,EQ,04),                     
       OVERLAY=(13:3,2,+090,ADD,07,02,ZD,EDIT=(TTT))),     
        IFTHEN=(WHEN=(05,02,ZD,EQ,05),                     
       OVERLAY=(13:3,2,+120,ADD,07,02,ZD,EDIT=(TTT))),     
        IFTHEN=(WHEN=(05,02,ZD,EQ,06),                     
       OVERLAY=(13:3,2,+151,ADD,07,02,ZD,EDIT=(TTT))),     
        IFTHEN=(WHEN=(05,02,ZD,EQ,07),                           
       OVERLAY=(13:3,2,+181,ADD,07,02,ZD,EDIT=(TTT))),           
        IFTHEN=(WHEN=(05,02,ZD,EQ,08),                           
       OVERLAY=(13:3,2,+212,ADD,07,02,ZD,EDIT=(TTT))),           
        IFTHEN=(WHEN=(05,02,ZD,EQ,09),                           
       OVERLAY=(13:3,2,+243,ADD,07,02,ZD,EDIT=(TTT))),           
        IFTHEN=(WHEN=(05,02,ZD,EQ,10),                             
       OVERLAY=(13:3,2,+273,ADD,07,02,ZD,EDIT=(TTT))),           
        IFTHEN=(WHEN=(05,02,ZD,EQ,11),                           
       OVERLAY=(13:3,2,+304,ADD,07,02,ZD,EDIT=(TTT))),           
        IFTHEN=(WHEN=(05,02,ZD,EQ,12),                           
       OVERLAY=(13:3,2,+334,ADD,07,02,ZD,EDIT=(TTT)))             
  OUTFIL IFOUTLEN=80,                                             
         IFTHEN=(WHEN=(88,1,CH,EQ,C'L',AND,                       
                       05,2,ZD,GT,2),                             
        OVERLAY=(15:+1,ADD,15,03,ZD,EDIT=(TTT)))
/*                 
//
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 27, 2011 6:32 pm
Reply with quote

Mlp,

If you use this, can you code it up with SYMNAMES and post it back, please?

Makes it easier for the next one along to change it to be able to use it. A bit of payback for Kevin's searching.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Sep 27, 2011 10:34 pm
Reply with quote

Hello,

Quote:
I also do not have the manual and syncsort have not published any manuals for public reading.
If your organization is licensed to use the product, all of the material is available for free from Syncsort support. . .
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Wed Sep 28, 2011 5:36 pm
Reply with quote

I got the programming manual for SYNCSORT but it does not contain any details regarding date conversion from gregorian to julian.

But I tried with above sort card provided by Kevin and it is working perfectly fine. Thank a lot!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Sep 28, 2011 8:34 pm
Reply with quote

Hello,

Quote:
I got the programming manual for SYNCSORT but it does not contain any details regarding date conversion from gregorian to julian.

My copy does. . .
Quote:
• Convert date data.
• Convert a 2-digit year field to a 4-digit year field.
• Convert a full-date field to a printable field with separators.
• Convert a Julian date field to a Gregorian date field.
• Convert a Gregorian date field to a Julian date field.

This is in the current manual, i didn't look in the 1.3.x material. The 1.4 (MFX) release of Syncsort has been available for a long time. . . Hopefully, there is a plan to upgrade soon so this and the other new feathers will be available to your organization's developers.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top