Combing two input files to other with a format



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Combing two input files to other with a format

Postby ibmmain » Thu Aug 20, 2009 2:51 pm

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
ibmmain
 
Posts: 1
Joined: Thu Aug 20, 2009 2:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Combing two input files to other with a format

Postby dick scherrer » Fri Aug 21, 2009 3:23 am

Hello and welcome to the forum,

Which sort product is used on your system?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Combing two input files to other with a format

Postby arcvns » Fri Aug 21, 2009 10:12 pm

Hi Dick,

I remember seeing exactly the same requirement in 2 other forums.!! :D
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: Combing two input files to other with a format

Postby dick scherrer » Sat Aug 22, 2009 1:07 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post