Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REXX/DB2 INTERFACE

Status
Not open for further replies.

balajipn

Programmer
Mar 30, 2004
65
IN
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.
 
Link to the loadlib that contains RXSUBCOM, something like:
"LIBDEF ISPLLIB DATASET ID('DSNssid.SDSNLOAD')"
 
Hi,

Sorry. Our load library is DB2T.SDSNLOAD and I have used the above statement. I am getting the following error message

IKJ56712I INVALID KEYWORD, ISPLLIB
IKJ56703A REENTER THIS OPERAND -

I tried ISRDDN to see all allocated datasets to the system dds and I could not find DB2T.SDSNLOAD under the ddname ISPLLIB.


Thanks,
Balaji.
 
Try to add "ADDRESS ISPEXEC" in front of the LIBDEF command, that should do the trick.

If you use ISRDDN you won't see the library in the ISPLLIB concatenation but in an ISPxxxx DD-name.

Hope this helps.

Wolfgang
 
Hi,

Thanks for your reply. I have checked up with my mainframe admistrator and I was told that DSNREXX is not a component of our mainframe system. Currently I have modified my design. I am writing a rexx (crude way, not an optimized one) to generate an EZT+ program which gets the details from the DB2 catalog tables and create a JCL for REPAIR/RUNSTAT.

Thanks,
Balaji.
 
Hi,

I have completed the utility rexx to generate the REPAIR/RUNSTATS jcl given the DB2 subsystem, HLQ and table name.

If some one is interested in using it, mail me at pnbalaji@yahoo.com.

Thanks,
Balaji.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top