View previous topic :: View next topic
|
Author |
Message |
aryanpa1
New User
Joined: 26 May 2007 Posts: 45 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
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 |
|
|
aryanpa1
New User
Joined: 26 May 2007 Posts: 45 Location: Chennai
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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
|
|
Back to top |
|
|
aryanpa1
New User
Joined: 26 May 2007 Posts: 45 Location: Chennai
|
|
|
|
Sorry expat, I work in MST hours. So not got chance to the reply from escapa immediately. |
|
Back to top |
|
|
|