This contains a sample REXX program that will call a COBOL program. The COBOL program will run as an ERU in the IDMS CV.
A REXX program can execute a task code that is defined to an IDMS system by invoking RHDCUCFB, the UCF Batch front-end program, and passing to it the name of the task code which it wishes to execute. As stated in the IDMS System Operations manual, when it is executed, "the batch front-end reads input from SYSIPT. Each statement is interpreted as terminal input and is passed to the DC/UCF system. The physical terminal name is used as the terminal identifier. Output from the DC/UCF task is returned to the front-end, which writes the output to SYSLST. The terminal disconnect occurs when the BYE task is invoked." The IDMS task that is invoked by RHDCUCFB will be executed as an ERU (External Run-Unit) under whichever IDMS CV is identified in the REXX program.
In order to accomplish this, a few steps are required:
With the above conditions in place, below is a sample REXX program which calls RHDCUCFB. RHDCUCFB will then execute any valid IDMS task code that is defined to the sysgen; that task will invoke the desired program. The code includes several values which must be replaced by your shop-specific values if this is to run successfully; these are identified below the sample program.
/* REXX */
newstack
x = msg('off')
"free fi(sysctl,syslst,sysipt,SYSTSPRT)"
"delete xxx"
"delete yyy"
x = msg('on')
"alloc fi(sysipt) ds(xxx) new lrecl(80)"
"alloc fi(syslst) ds(yyy) new"
"alloc fi(sysctl) ds('IDMSCV.sysctl') shr reu"
"alloc fi(SYSTSPRT) ds(zzz) new"
QUEUE 'DCMT D AC TA;' /* any valid IDMS task code */
QUEUE 'BYE;'
queue '/*'
n=queued()
"execio "n" diskw sysipt (finis"
"call 'IDMS.PROD.LOADLIB(RHDCUCFB)'"
ucfrc = rc
delstack
finish:
return
For this to run, make the following substitutions: