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 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: 8617
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: 7314

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: 8617
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 Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am

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