Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Appending the day of the week at tghe end of the record
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: 2284
Location: @my desk

PostPosted: Sat Nov 13, 2010 1:13 am    Post subject:
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Sat Nov 13, 2010 1:49 am    Post subject:
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Sat Nov 13, 2010 2:11 am    Post subject:
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    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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us