Hi,
I need your expertise.
I have a JOB that unloads DB2 Table into a Flat File. However, the DB2 Table Structure keeps on changing, that is, additional columns keeps on changing the layout of the file.
The issue here is that, we manually change the record length of the file whenever there's a change in Table Structure (e.g. ADD New Column). Before loading back the unloaded file after Data Patching is done.
E.g.
STEP01 (Unload DB2 Table into a Flat FIle, UNLOAD FILE) -- new column is added
STEP02 (Program will be run to do the patching on some columns of UNLOAD FILE, and output it into PATCHED File)
STEP03 (LOAD PATCHED File into the DB2 Table)
To Automate the PROCESS :
In STEP01, I need to KNOW the RECORD Length of the newly formatted File (UNLOAD FILE). ---> HOW???
Once I obtain the RECLEN, I need to replaced the old FILE Length with the New File Length so I can LOAD the PATCHED File Correctly. ---> HOW???
I am thinking of adding 2 Job Steps,
First : to obtain Record Length of the File, save it to a variable, then pass it to Second Step.
Second : Will retrieve the Record Length variable result from First Step, and the rest of the process will be the same.
Kindly advise me, as to how to go about it.
Thank you for your help.