
How to call a Cobol/DB2 program from REXX
Hi there,
you can do a number of things to solve this problem:
a) issue an "ISPEXEC LIBDEF ISPLLIB DATASET(yourloadlib)" this adds
yourloadlib to the searchorder of ISPLLIB. Then call the program using
"ISPEXEC SELECT PGM(yourprogram)", be sure to remove the temporary
loadlibrary by issuing
"ISPEXEC LIBDEF ISPLLIB"
b) you can use a tso call statement. This allows you to specify a fully
qualified datasetname e.g.
Address TSO "CALL 'yourloadlib(yourprogram)' "
c) add the loadlibrary to the ISPLLIB ddname before starting ISPF. Then
you can issue
ADDRESS LINKMVS 'yourprogram'
ADDRESS ATTACH 'yourprogram'
ADDRESS MVS 'yourprogram'
etc. depending on how you want to pass parameters (see REXX Reference
manual)
this is the neatest way, but all will do fine in most cases...
Thomas
Quote:
> I am trying to call a cobol db2 program using rexx. The cobol program
> is
> called from a REXX panel. The cobol program basically accepts the
> customer
> number which is passed as a parameter and it displays the customer
> name. In
> my rexx i allocate a dataset for the sysout and whatever is displayed
> by the
> cobol/db2 program i extract and display that in a panel. Whenever i
> try to
> call the cobol program through REXX it is giving S806 since i
> couldn't
> specify the load module for the DB2 libraries(DSNLOAD). In short while
> running this program as batch through the jcl we specify this library
> in the
> STEPLIB of the jcl.
> How can i solve this please.
> Chandar