View previous topic :: View next topic
|
Author |
Message |
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Hi,
I searched forum and google couldn't find any,not sure whether same type of topic was posted previously..
Here goes my question.
I have two files fileA and fileB with LREC of 80 ;Each of these files have a header and i need them to be removed from the output using SORT.
File A
Header
Data1
Data3
Data4
FileB
Header
Data2
Data6
Output File
Data1
Data2
Data3
Data4
Data6
I tried SKIPREC,it will remove header only from first file.Is there any other option to do it? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Are you using DFSORT or SYNCSORT as the solution may vary according to the product being used. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
also show us sample example files.
How header and data records are identified? Is there a record type indicator in the file? |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
I am using SYNCSORT.
Header record(row) contains title and the remaining are data
Example
Header--> EmpNo Dept Salary
Data-----> 1234 Payroll 10000
2345 HR 5000
File2 also has the same format;I want header(or first record in the file) to be removed from all the input files and merge data alone from them.
I can use OMIT function having some part of header label but i guess it will not be generic because almost 5-6 files are to be merged which will have same data content but Header text can vary for each file.Moreover new files can be added.
I am trying to find whether there is any generic part of code which will move first record from each of the input file used irrespective of what is the content in it. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Muthu,
Answer all the Questions posted.
Quote: |
I searched forum and google couldn't find any |
No, You did not.
These kind of topics have been debated to death. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
I am explaining you the same scenario in another way,
Assume 10 files are sorted and merged into single file of same LREC using SYNCSORT.
My requirement is to remove the first record in each of the 10 files and create a sorted output irrespective of what data or type of data present in the first record.
Quote: |
These kind of topics have been debated to death. |
I will be very much glad if you get me one link with solution similar to my requirement usng SORT . |
|
Back to top |
|
|
|