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: 1770
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: 1825
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: 6968
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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 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 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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