Specifying an API command
When you write a program in REXX, you pass a character image of the command to be issued to the REXX function package supplied by CICSPlex SM.
- Invoke the EYUAPI function with the name of the command as its parameter.
- Use the REXX ADDRESS command to pass subsequent statements to the function package.
var = EYUAPI('GET OBJECT(LOCTRAN)...')var is the variable assigned to receive the return code
from the EYUAPI function.
ADDRESS CPSM 'GET OBJECT(LOCTRAN)...' var = EYUAPI('GET OBJECT(LOCTRAN)' ,
'RESULT(setvar) THREAD(THRD1)' ,
'RESPONSE(rspvar) REASON(reavar)')In this example, the result set to receive the LOCTRAN objects, and the RESPONSE and REASON options are all specified as REXX variables.
var = EYUAPI('CONNECT USER('userid') VERSION(0310)' ,
'THREAD(thdtkn) RESPONSE(rspvar) REASON(reavar)')In those cases where you want to access a resource table, special processing is required. An example of this is a FETCH command, which requires an INTO option to define where the resource table data should be placed for processing by your program. In REXX, you must specify the INTO option as the prefix of a stem variable to receive one or more resource table records. The zero entry of the stem variable indicates the number of records returned.