Page 1 of 1

merge the records from 3 input files into 1 output file alte

PostPosted: Sun Jan 24, 2016 10:43 am
by MFUSERVDC
Hi,
Would you like to help me on below logic
I want to merge the records from 3 input files into 1 output file alternetevely using sort. Below are the details
Input File1 :--
Rec1 ABBBB
BCCCC
DEEEE
Rec2 BDDDD
DFFFF
RTTTT
Input File2 :--
Rec1 SGGHH
YTTTT
DWWWW
Rec2 QEEEE
DRRRR
RYYYY
Input File3 :--
Rec1 URTRT
ATTTT
DSSSS
Rec2 REEEY
DIYUU
REDER

Output File :--
Rec1 ABBBB
BCCCC
DEEEE
Rec1 SGGHH
YTTTT
DWWWW
Rec1 URTRT
ATTTT
DSSSS
Rec2 BDDDD
DFFFF
RTTTT
Rec2 QEEEE
DRRRR
RYYYY
Rec2 REEEY
DIYUU
REDER

There is no key here. All records having record length 133.

I tried the some sort cards for merge alternately but its merging record after record. However I want to merge 1st few records from 1st files and then from 2nd and then from 3rd (as explained above example).
Please help me in this (asap).

Thanks,
MFUSERVDC

Re: merge the records from 3 input files into 1 output file

PostPosted: Sun Jan 24, 2016 7:26 pm
by NicC
Please only post your query ONCE. Do you have DFSort or Syncsort or both? If both, which do you prefer an answer for? Also, please present you data so that it is understandable i.e. use the code tags.

Also, do NOT request any answer let alone one ASAP. People respond on their own time, for free, if they want to. If you have an urgent requirement then pay someone.

Re: merge the records from 3 input files into 1 output file

PostPosted: Sun Jan 24, 2016 9:57 pm
by MFUSERVDC
Hi NicC,
Thanks for reply.
My apology for posting query twice and asking help ASAP. I am new to forum and yesterday I was facing problem while posting query and hence it got posted 2 times.
DFSort or Syncsort both are available with me. Also I was able to merge record alternatively when data present in 1 line, but when I want to merge some lines from 1st input file and then from some lines from 2nd and then from 3rd, I was not able to do that. That's real pain for me.
It would be great help, if you have any solution for this.

Thanks,
MFUSERVDC