IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Appending the day of the week at tghe end of the record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Sat Nov 13, 2010 12:55 am
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Nov 13, 2010 1:13 am
Reply with quote

Ray,

Did you try S'&WDAY' ?
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Sat Nov 13, 2010 1:35 am
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Nov 13, 2010 1:49 am
Reply with quote

You seem to be on the right track. Try to use OVERLAY instead of BUILD.
Code:
  INREC OVERLAY=(18:MYDAY)
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Sat Nov 13, 2010 2:01 am
Reply with quote

It worked. OVERLAY instead of BUILD did it.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Nov 13, 2010 2:11 am
Reply with quote

Glad that it worked. icon_smile.gif

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top