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
 

 

How to replace a data element from file1 to another

 
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: Thu Mar 24, 2011 8:14 am    Post subject: How to replace a data element from file1 to another
Reply with quote

Is it possible to copy a data element "position (9-12)" from a file1
into file2 at a position (17-20)

File1:
Code:
EDIT       PUBLIC.TST.FILE1
Command ===>               
****** *********************
000001 ABCD EF GHIJ         
****** *********************


File2:
Code:
EDIT       PUBLIC.TST.FILE2                       
Command ===>                                       
****** ***************************** Top of Data **
000001 XXXXXXYYYYYYYY  1234                       
****** **************************** Bottom of Data


We are a SYNCSORT shop.
Back to top
View user's profile Send private message

Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Thu Mar 24, 2011 7:07 pm    Post subject: Reply to: How to replace a data element from file1 to anothe
Reply with quote

Dear Listers,

Is it not possible what I wanted to get done? Do I need to write a program to do it?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Thu Mar 24, 2011 7:44 pm    Post subject:
Reply with quote

I believe that you would do well to search this forum for "OVERLAY".
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1722
Location: UK

PostPosted: Thu Mar 24, 2011 8:56 pm    Post subject:
Reply with quote

And be patient - you posted in the middle of the night for me and others. We all have real jobs to do that take priority over helping (or otherwise) in the forum. If you want 'quick' then search, read or pay.

And you have not given an example of your desired output. And...will bith your files have only 1 record? And...if multiple records how are they matched? Are there duplicates? etc etc eg. LRECL and RECFM
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Thu Mar 24, 2011 9:19 pm    Post subject:
Reply with quote

Hi Nic,

The output will be a third file (LRECL=80) -
Code:
EDIT       PUBLIC.TST.FILE3                       
Command ===>                                       
****** ***************************** Top of Data **
000001 XXXXXXYYYYYYYY  GHIJ                       
****** **************************** Bottom of Data


Input:
File 1 LRECL = 30
File 2 LRECL = 80

Code:
EDIT       PUBLIC.TST.FILE1
Command ===>               
****** *********************
000001 ABCD EF GHIJ         
****** *********************

Code:
EDIT       PUBLIC.TST.FILE2                       
Command ===>                                       
****** ***************************** Top of Data **
000001 XXXXXXYYYYYYYY  1234                       
****** **************************** Bottom of Data
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Mar 24, 2011 9:27 pm    Post subject:
Reply with quote

how many records are in each file?

what are the matching columns?
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Thu Mar 24, 2011 10:15 pm    Post subject:
Reply with quote

Hi Dick,

Each file contains one record and there both the files have the first four characters the same. Hence we can match on those.
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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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