Hi,
I already know both REXX & DB2 to some extent, but didn't try to access DB2 from REXX. I got some info on this and trying to get this done. I tried the following code but got errors. Let me know if something can be done.
============================================================
/********** REXX ***************/
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS TSO
"SUBCOM DSNREXX"
IF rc <> 0 THEN DO
rc = RXSUBCOM('ADD','DSNREXX','DSNREXX')
IF rc <> 0 THEN
SAY "RXSUBCOM rc : " rc
EXIT 12
END
END
EXIT 1
============================================================
When I try to run the above code, I am getting the following error.
6 +++ rc = RXSUBCOM('ADD','DSNREXX','DSNREXX')
IRX0043I Error running DB3, line 6: Routine not found
Let me know if I need to do something extra (like allocating Db2 libraries to ISPLLIB etc).
I am planning to write a REXX exec to generate a REPAIR & RUNSTATS job for a DB2 table given the Db2 subsystem, HLQ and table name.
Thanks,
Balaji.
I already know both REXX & DB2 to some extent, but didn't try to access DB2 from REXX. I got some info on this and trying to get this done. I tried the following code but got errors. Let me know if something can be done.
============================================================
/********** REXX ***************/
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS TSO
"SUBCOM DSNREXX"
IF rc <> 0 THEN DO
rc = RXSUBCOM('ADD','DSNREXX','DSNREXX')
IF rc <> 0 THEN
SAY "RXSUBCOM rc : " rc
EXIT 12
END
END
EXIT 1
============================================================
When I try to run the above code, I am getting the following error.
6 +++ rc = RXSUBCOM('ADD','DSNREXX','DSNREXX')
IRX0043I Error running DB3, line 6: Routine not found
Let me know if I need to do something extra (like allocating Db2 libraries to ISPLLIB etc).
I am planning to write a REXX exec to generate a REPAIR & RUNSTATS job for a DB2 table given the Db2 subsystem, HLQ and table name.
Thanks,
Balaji.