Hi All,
This is my first post to this board.
I am looking out for the steps which can be used to created multiple output files from a single input file using a COBOL USER EXIT routine.
My input file is having n records. I want to split this input file into multiple files based on matching/non-matching records from a control file.
In a normal SORT exit routine we define SORTIN/SORTOUT as input/output datasets. I need to know how can we use/override filenames specified in the OUTFIL statement in our COBOL program. Or if there is any other way of achieving using USER EXIT COBOL routine.
My input file looks like
FIELD1 FIELD2
===========
A1 B1
A2 B2
A3 B2
A3 B1
A4 B2
CONTROL FILE
=========
A1
A3
OUTFILE 01
=======
A1 B1
A3 B2
A3 B1
OUTFILE 02
=======
A2 B2
A4 B2
I know how to perform the task above by simply joining the files on the keys mentioned. However since i am trying to develop a standard rountine specific for my project i would be needing it do using USER EXIT COBOL routine.
Thanks for your help in advance..