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
 

 

Insert data at a particular position

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

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sat May 28, 2011 7:12 pm    Post subject: Insert data at a particular position
Reply with quote

Hi,

I need to insert data at a particular position of all the records in a dataset. Consider the below records
Code:

ABCD   EF
LMNO   PQ
RSTU   WX

Now I need to insert XX at Column position 5 and 6 for all the records.
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sat May 28, 2011 8:32 pm    Post subject:
Reply with quote

Here is step will do desired....
(Provided you want 5th and 6th position to be replaced by XX)
Code:

//STEP0100 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DISP=SHR,DSN=YOUR.INPUT.FILE.HERE           
//SORTOUT  DD DSN=YOUR.OUTPUT.FILE.HERE                   
//SYSIN    DD *                                           
 OPTION COPY                                               
 INREC OVERLAY=(5:C'XX')                                   


Read through Franks DFSORT Getting started instead of blindly using these solutions... See

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080

Cheers
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sat Jun 18, 2011 4:42 pm    Post subject: Reply to: Insert data at a particular position
Reply with quote

Thanks Escapa... Does OVERLAY increases the length of the file or does it overrides in the desired position?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1826
Location: UK

PostPosted: Sat Jun 18, 2011 5:00 pm    Post subject:
Reply with quote

It is OVERLAY not INSERT so what do you think?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Jun 19, 2011 5:04 am    Post subject: Re: Reply to: Insert data at a particular position
Reply with quote

mushreyas wrote:
Thanks Escapa... Does OVERLAY increases the length of the file or does it overrides in the desired position?

Later is true
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 Paasing symbolic parameter to instrea... Anirudh Anand JCL & VSAM 1 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 11 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm


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