View previous topic :: View next topic
|
Author |
Message |
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hi All,
I am struggling with creating a JCL:
My requirement is whenever my key field changes (in bold below) in a file then I need to insert two records from a different file and write the key field in those two new inserted records. Below is the example
Input file:
12345AAAA67890
12335AAAA67890
12395AAAA67890
23454BBBB12344
23452BBBB12344
12345CCCC45678
12346CCCC45678
12347CCCC45678
input File 2
00000000000000
99990000000000
Output should look like below
12345AAAA67890
12335AAAA67890
12395AAAA67890
0000AAAA000000
9999AAAA000000
23454BBBB12344
23452BBBB12344
0000BBBB000000
9999BBBB000000
12345CCCC45678
12346CCCC45678
12347CCCC45678
0000CCCC000000
9999CCCC000000
The above under lined records needs to be inserted from a different file if my key field value differs.
Please note that all the files are VB here.
Any kind of help will be really appreciated
Regards,
Mohit |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You can use this one to base your Control Cards on.
You need to put the "last reord" marker in an extension to your record.
You need to have OUTFIL and to test the extension. When true, BUILD the original record, and use the slash operator "/" twice to get your new records inserted in the correct place.
To get the values for your new records, have a short step which generates to symbols/SYMNAMES from the records on your two-record file.
Add those SYMNAMES to your processing step, and use the values to insert the new records. |
|
Back to top |
|
|
|