View previous topic :: View next topic
Author
Message
Evantra New User Joined: 05 Jan 2008Posts: 15 Location: Sacramento, Ca
I've searched the forum and unable to find my answer.
I'm trying to insert the current date using syncsort. Below is what I currently have:
Code:
JOINKEYS FILES=F1,FIELDS=(1,15,A)
JOINKEYS FILES=F2,FIELDS=(1,15,A)
JOIN UNPAIRED,F2,ONLY
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,121),REMOVECC,
TRAILER1=('TOTAL TAPE COUNT: ',COUNT=(M11,LENGTH=4))
Back to top
CICS Guy Senior Member Joined: 18 Jul 2007Posts: 2146 Location: At my coffee table
Have you looked at the various &DATE parameters?
SyncSort 2.76 for z/OS 1.2 Programmer’s Guide wrote:
&DATE
The &DATE subparameter specifies the current system date and requires 8 bytes to display mm/dd/yy.
Back to top
Evantra New User Joined: 05 Jan 2008Posts: 15 Location: Sacramento, Ca
Thanks for the reply CICS Guy,
I did try that before I posted here and it did not work. I put it in the trailer. Maybe I coded it wrong there somehow.
Thanks
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello Ed and welcome to the forums,
I'll confess to being a bit confused. Your request mentions getting the current date into the output, but your example shows creating a trailer with a record count - with the M11 specified.
Here's an example of getting the current date into the output records - the data isn't much use, but notice that "today" is in the first 8 bytes of the output records.
Code:
//SORTIN DD *
123456789012345678901234567890
234567890123456789012345678901
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(&DATE1,
8,72)
/*
gives:
2008060289012345678901234567890
2008060290123456789012345678901
Something that is always useful is if along with a question, sample input and desired output from that input is shown. Mentioning the dsorg/lrecl can also save time.
Back to top
Evantra New User Joined: 05 Jan 2008Posts: 15 Location: Sacramento, Ca
I will try that. Thanks for the help and suggestions!
Back to top
Alissa Margulies SYNCSORT Support Joined: 25 Jul 2007Posts: 496 Location: USA
Ed VanBebber wrote:
I've searched the forum and unable to find my answer.
I'm trying to insert the current date using syncsort. Below is what I currently have:
Code:
JOINKEYS FILES=F1,FIELDS=(1,15,A)
JOINKEYS FILES=F2,FIELDS=(1,15,A)
JOIN UNPAIRED,F2,ONLY
SORT FIELDS=COPY
OUTFIL FILES=01,OUTREC=(1,121),REMOVECC,
TRAILER1=('TOTAL TAPE COUNT: ',COUNT=(M11,LENGTH=4))
Try this:
Code:
OUTFIL FILES=01,OUTREC=(1,121),REMOVECC,
TRAILER1=('TOTAL TAPE COUNT: ',COUNT=(M11,LENGTH=4),
45:&DATE)
Position 45 can be changed to any position per your requirements.
Back to top
Please enable JavaScript!