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 Gregorian to Julian

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - Convert Gregorian to Julian
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 11, 2011 2:08 pm    Post subject:
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Jul 11, 2011 7:40 pm    Post subject: Reply to: Convert Gregorian to Julian
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 11, 2011 9:09 pm    Post subject:
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    Post subject:
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    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 Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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