Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to use overlay to prefix a value to a dataset ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
SCARCEBOYZ

New User


Joined: 16 May 2005
Posts: 32
Location: Millenium Business Park, Mumbai

PostPosted: Mon Jan 28, 2008 5:03 pm    Post subject: How to use overlay to prefix a value to a dataset ?
Reply with quote

I have a input dataset of length 1900. My requirement is to create an output dataset of 1902 by prefixing a value say '01' in the input dataset. I'm able to do this by siffixing a value at end but I am curious to know that how can we prefix a value using Overlay parameter.

Below is my JCL to add a suffix in a dataset using overlay.

Code:

//STEP224  EXEC PGM=SYNCSORT                                   
//SYSOUT   DD SYSOUT=*                                                         
//SYMNAMES DD DSN=value_to_be_passed_length_01,DISP=SHR            <<< contains FLD1,'01'
//SORTIN   DD DSN=Input_File_length_1900,DISP=SHR
//SORTOUT  DD DSN=output_dataset,       
//            DISP=(,CATLG,),                               
//            SPACE=(CYL,(30,30),RLSE)
//SYSIN    DD *
  OPTION COPY             
  INREC OVERLAY=(1901:FLD1)
/*                 
//


How can I use overlay option for adding a value at start.

Regards,
Vivek
Back to top
View user's profile Send private message

yogeshpawar

New User


Joined: 01 Mar 2006
Posts: 37
Location: Sussex-UK

PostPosted: Mon Jan 28, 2008 9:02 pm    Post subject: Reply to: How to use overlay to prefix a value to a dataset
Reply with quote

Hi,

I think you want field to be added at the start of the record which will be an insert operation for i/p record. Then you can use BUILD for this.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 29, 2008 12:04 am    Post subject:
Reply with quote

IEBGENER offers you the possibility to compose a file from constants and input. The utility manual can tell you all icon_wink.gif
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Tue Jan 29, 2008 8:58 am    Post subject:
Reply with quote

Hi Buddy,

Guess, the option OVERLAY is to write over the record in the Input Dataset. This means U can only overwrite the record and U cant insert a new value in the begining of the record. Instead, you can use SORT program to insert a new value in the starting position.

And the JCL is

//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=INPUT.DATASET,DISP=SHR => Record length 80
//SORTOUT DD DSN=OUTPUT.DATASET,DISP=SHR => Rec Length 81
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(C'1',2:1,80) => Inserts '1' in position 1 in output rec.
/*

I believe this will work.


Reg,
Srinath.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jan 29, 2008 12:33 pm    Post subject:
Reply with quote

This SORT JOB with OVERLAY feature appends every record of the i/p file with the characters "01"
Code:
//******************************************
//STEP1    EXEC PGM=ICEMAN                 
//SYSOUT   DD SYSOUT= *                     
//SORTIN   DD *                             
KK1                                         
KK2                                         
KK3                                         
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                             
           OPTION COPY                     
           INREC OVERLAY=(3:1,77,1:C'01')   
/*                                         




SORTOUT
Code:
01KK1
01KK2
01KK3
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 could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm
This topic is locked: you cannot edit posts or make replies. How could i share my personal dataset... samenxia163 TSO/ISPF 1 Fri Mar 09, 2018 12:18 pm
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us