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: 2180
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: 2180
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: 2180
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 How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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