Hi Forum,
I am unloading the DB2 table to a flat file. Below is my code,
//STEP01 EXEC DSNPGM,
// VER='TEST',
// SYSTEM='TD0T',
// PRM='SQL',
// PROGRAM='DSNTIAUL'
//*-------------------------------------------------------------------*/
//* SYSIN : Contains the SQL commands to fetch the required records.*/
//*-------------------------------------------------------------------*/
//SYSIN DD DSN=AGGT.UTTTTTT.CTLCARDS(CAGG1A01),DISP=SHR
//*-------------------------------------------------------------------*/
//* SYSREC00: This is the output file the DB2 table is unloaded into. */
//*-------------------------------------------------------------------*/
//SYSREC00 DD DSN=AGGT.dataset1,disp=shr
//SYSPUNCH DD DUMMY
I pass the SQLs thru SYSIN and captures the unloaded data into SYSREC00; Like this I have 2 more SQLs, Is there any way to pass those SQLs too and capture the unloaded data into different data sets like SYSREC01,SYSREC02 in the same step instead of writing separate 2 more steps.
And One more thing, When I execute this, I am getting RC04 which is acceptable but How to get the RC00.
Note: When I write SELECT * instead of my required SQL I will get RC00.
Kindly reply me if anybody has solution for my problem.
Thanks,
Shankar.