View previous topic :: View next topic
|
Author |
Message |
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
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 |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
I believe that you would do well to search this forum for "OVERLAY". |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
how many records are in each file?
what are the matching columns? |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
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 |
|
|
|