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 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: 1783
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: 1932
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: 6970
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 Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am

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