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
 
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: 1894
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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