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

Syncsort - Convert Gregorian to Julian


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

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Mon Jul 11, 2011 1:50 pm
Reply with quote

Hi All,

Need your help in writing a sort card to convert Gregorian date to Julian date in a given file

Input:

Gregorian date 'CCYYMMDD' starts from 12th position.

Output:

Julian date 'CCYYDDD' starts from same 12th position[/code]
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 11, 2011 2:08 pm
Reply with quote

Please post the SYSOUT output from a dummy sort step so that we can see the sort product and release level installed.

Input and output DSORG, RECFM and LRECL are also required.

What happens to the unused byte remaining after the date conversion.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Jul 11, 2011 4:54 pm
Reply with quote

You can use something like this, I have replaced unused byte with SPACE..

If your date is in different datatype, provide better details of what Expat already asked.


Code:

//S2    EXEC  PGM=SORT                       
//SYSOUT    DD  SYSOUT=*                     
//SORTIN    DD *                             
           20110711                           
//SORTOUT DD SYSOUT=*                         
//SYSIN    DD    *                           
  OPTION COPY                                 
  INREC OVERLAY=(12:12,8,Y4T,TOJUL=Y4T,19:X) 
/*                                           
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Mon Jul 11, 2011 7:37 pm
Reply with quote

Hi Sambhaji,

I am seeing below error when I use this.

Code:


SYNCSORT FOR Z/OS  1.3.2.1R    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                    AMERICAN EXPRESS   TRS   IPC   z/OS   1.11.
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1182D, MODEL 2097 604             LICEN
SYSIN :                                                                       
  OPTION COPY                                                                 
  INREC OVERLAY=(12:12,8,Y4T,TOJUL=Y4T,19:X)                                   
                         *                                                     
WER268A  INREC STATEMENT   : SYNTAX ERROR                                     
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
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: Mon Jul 11, 2011 7:40 pm
Reply with quote

Because you are using SYNCSORT not DFSORT.

Off to the JCL forum where the SYNCSORT queries are, soon...

expat asked you hours ago what sort product you had. Now we know.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 11, 2011 9:09 pm
Reply with quote

aryanpa1

The reason why we ask for the information is to prevent you wasting the time of people like Escapa from giving you a wrong solution for the product installed. Had you have posted the required information then perhaps you may have had a solution by now

icon_evil.gif
Back to top
View user's profile Send private message
aryanpa1

New User


Joined: 26 May 2007
Posts: 45
Location: Chennai

PostPosted: Mon Jul 11, 2011 11:06 pm
Reply with quote

Sorry expat, I work in MST hours. So not got chance to the reply from escapa immediately.
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 Compare only first records of the fil... SYNCSORT 7
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top