View previous topic :: View next topic
|
Author |
Message |
rksuresh
New User
Joined: 09 Jan 2006 Posts: 11
|
|
|
|
Hi All,
I need to copy from 2 input files to one output file.
1st input file having only one header record.
2nd input file having one header and detail record also.
here i want to copy header record from the 1st input file and dont want to copy header record from the 2nd input file but need to copy all details records.
Example
File 1
------------------------Header-1---------------------------
File 2
------------------------Header 2---------------------------
--------------------details records------------------------
--
--
--
Output file looks like
------------------------Header-1---------------------------
--------------------details records------------------------
--
--
--
Please give me File aid copy option for this
Looking your response
Thanks
Suresh |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
rksuresh,
How do you identify the header records? Do you have any standard formats for these? |
|
Back to top |
|
|
rksuresh
New User
Joined: 09 Jan 2006 Posts: 11
|
|
|
|
Hi Murali,
Thanks for your response.
In 1st File column position 370 to 380 we have "ABCDEFGHIJ".
In 2ND FILE column position 370 to 380 we have "KLMNOPQRST".
So i want my output file as
1--------------------------------------370----------380------------
----------------------------------------ABCDEFGHIJ---------------<-Header Rec
--------------------------dETAILS RECORDS---------------------<-Details Rec
---
---
---
Thanks
Suresh |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Suresh,
In the FA batch mode, concatenate the two files and skip the HEADER2 record. Please note this is applicable only if the header2 has constant value across runs.. You could do this using other utils also. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
SORT can serve better for your problem. |
|
Back to top |
|
|
rksuresh
New User
Joined: 09 Jan 2006 Posts: 11
|
|
|
|
Hi Murali,
Can you give me the syntax for skipping the second record in file aid batch mode.I have tried initial skip is 0 and copy 1st record then skip 1 record,
the output is copied alternatively records.
Please give syntax for this.it will help full to me
thanks
Suresh |
|
Back to top |
|
|
|