| Author |
Message |
raak
Active User
Joined: 23 May 2006 Posts: 172 Location: chennai
|
|
|
|
I have three i/pfiles of LRECL 20 bytes each.
My O/P file is a 60 byte file.
I need the contents of these I/P files to come horizontally one after the other ( record-1 of file-1 should occupy the first 20 bytes of output file, then record-1 of file-2 should occupy next 20 bytes of o/p file and record-1 of file-3 should occupy next 20 bytes of o/p file)..Like wise it should happen for all the records in the I/P file...
can I use JOINKEYS for this?? I dont(can't) have any field to be checked for joining the files as the I/P files have different values in the corresponding records... |
|
| Back to top |
|
 |
References
|
Posted: Tue May 06, 2008 1:29 pm Post subject: Re: Syncsort - query on joining two files |
 |
|
|
 |
acevedo
Active User
Joined: 11 May 2005 Posts: 252 Location: Spain
|
|
|
|
| AFAIK, you need a KEY to match them, if the key is the order you could use INREC with SEQNUM... |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6033 Location: 221 B Baker St
|
|
|
|
Hello,
You could generate a sequence number in each record of the 3 files. You could then join by the seqnum.
What should happen if there is not the same number of records in each file?
If this was my requirement, i'd write the tiny bit of cobol code to read the 3 files one itme and write the combined records to the 60-byte file. |
|
| Back to top |
|
 |
|
|