Page 1 of 1

Combing two input files to other with a format

PostPosted: Thu Aug 20, 2009 2:51 pm
by ibmmain
Hi,
I have 2 files with header,detail & trailor records in it.

Let the first file be file 1 be

HDR 1010 20090820 20090820 181007 77000 7010
detail1 0000 aaaaaaaaaaaaaaaaaaaaaaa
detail2 0000 bbbbbbbbbbbbbbbbbbbbbbb
TRL 1010 20090820 20090820 181007 77000 7010 00002


and file 2 be

HDR 1010 20090820 20090820 181007 77000 7010
detail3 0000 cccccccccccccccccccccccccc
detail4 0000 dddddddddddddddddddddd
detail5 0000 bbbbbbbbbbbbbbbbbbbbbbb
TRL 1010 20090820 20090820 181007 77000 7010 00003


The TRL has record count field at last 00002 & 00003 for the two files.


My requirement is to get FILE3

HDR 1010 20090820 20090820 181007 77000 7010
detail1 0000 aaaaaaaaaaaaaaaaaaaaaaa
detail2 0000 bbbbbbbbbbbbbbbbbbbbbbb
detail3 0000 cccccccccccccccccccccccccc
detail4 0000 dddddddddddddddddddddd
detail5 0000 bbbbbbbbbbbbbbbbbbbbbbb
TRL 1010 20090820 20090820 181007 77000 7010 00005

here count should be count of file1 ,file2.we can use the below to take only detail records.
INCLUDE COND=(1,3,CH,EQ,C'DET')
All the detail part will have detail as suffix.
Please let me know to achive this

Re: Combing two input files to other with a format

PostPosted: Fri Aug 21, 2009 3:23 am
by dick scherrer
Hello and welcome to the forum,

Which sort product is used on your system?

Re: Combing two input files to other with a format

PostPosted: Fri Aug 21, 2009 10:12 pm
by arcvns
Hi Dick,

I remember seeing exactly the same requirement in 2 other forums.!! :D

Re: Combing two input files to other with a format

PostPosted: Sat Aug 22, 2009 1:07 am
by dick scherrer
Hi Arun,

Yup, bad enough so many want others to do their work. Quite a few want multiple other people to do their work. . . :?

What an incredible waste of time. . .