Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Syncsort - query on joining two files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
raak

Active User


Joined: 23 May 2006
Posts: 172
Location: chennai

PostPosted: Tue May 06, 2008 1:29 pm    Post subject: Syncsort - query on joining two files
Reply with quote

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
View user's profile Send private message
References
PostPosted: Tue May 06, 2008 1:29 pm    Post subject: Re: Syncsort - query on joining two files Reply with quote

acevedo

Active User


Joined: 11 May 2005
Posts: 252
Location: Spain

PostPosted: Tue May 06, 2008 2:25 pm    Post subject:
Reply with quote

AFAIK, you need a KEY to match them, if the key is the order you could use INREC with SEQNUM...
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6033
Location: 221 B Baker St

PostPosted: Wed May 07, 2008 5:10 am    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1