View previous topic :: View next topic
|
Author |
Message |
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
Dear Listers,
I have a simple requirement to append the Day of the week to the Input.
E.g. My input File is
Code: |
EDIT PUBLIC.TEST.INPUT.FILE01
Command ===>
****** *****************************
000001 ABCD 1234 LMNO 2
****** **************************** |
I want the output as
Code: |
EDIT PUBLIC.TEST.INPUT.FILE01
Command ===>
****** *****************************
000001 ABCD 1234 LMNO 2 FRI
****** **************************** |
I tried coding it but apparently I am not doing it right.
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
MYDAY,S'&LWDAY'
//SORTIN DD DSN=PUBLIC.TEST.INPUT.FILE01,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(MYDAY)
//* |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Ray,
Did you try S'&WDAY' ? |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
Arun Raj wrote: |
Ray,
Did you try S'&WDAY' ? |
I tried but have the same issues - I just get the day "FRI" instead of the
Input File And the day in the SYSOUT
Code: |
SYNCSORT LICENSED FOR CPU SERIAL NUMBER
SYSIN :
SORT FIELDS=COPY
INREC BUILD=(MYDAY)
DATA DICTIONARY SYMBOLS SUBSTITUTED :
SORT FIELDS=COPY
INREC BUILD=(C'FRI')
WER276B SYSDIAG= 133417, 2184057, 21840 |
....
Code: |
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTIN : EXCP'S=1,UNIT=3390,DEV=E40F,CHP=(6C6E6D6F,2),VOL=PBL037
WER416B BSAM WAS USED FOR SORTOUT
WER054I RCD IN 1, OUT 1
WER169I RELEASE 1.3 BATCH 0506 TPF LEVEL 2.1
WER052I END SYNCSORT - KC02628S,STEP0100,,DIAG=8400,5344,A80C,00E4,CCF2,68
FRI
******************************** BOTTOM OF DATA |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
You seem to be on the right track. Try to use OVERLAY instead of BUILD.
Code: |
INREC OVERLAY=(18:MYDAY) |
|
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
It worked. OVERLAY instead of BUILD did it. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Glad that it worked.
BTW your sort product is Syncsort and NOT DFSORT. Syncsort topics are discussed in the JCL part of this forum. Please keep this in mind for your future posts. |
|
Back to top |
|
|
|