RCB_SETFNC
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
|
xcall RCB_SETFNC(rcbid, routine[, elb])
or
xcall RCB_SETFNC(rcbid,, address)
Arguments
rcbid
The ID of the call block for the routine. (n)
routine
The name of a subroutine or function to be executed. (a)
elb
(optional) The name of the ELB in which this routine is located. This argument is not required if the ELB is explicitly opened before calling RCB_CALL or if the ELB is linked. (a)
address
The address for the ELB in which the routine is located. (n)
Discussion
RCB_SETFNC specifies a routine to call when the RCB is passed to RCB_CALL. Any errors that result from the call itself (for example, $ERR_RTNNF, $ERR_NOMEM, $ERR_INVRCBHND, $ERR_NOTRCBHND, or $ERR_XFBADMTHID) are signaled.
If elb is not already open, it is opened, along with any ELBs that it is linked against. If the specified ELB or any linked ELB is not found, the runtime generates a “File not found” error ($ERR_FNF).
On OpenVMS, if the routine resides in a shared image, it will only be found if the shared image is explicitly specified or an OPENELB has been done on the shared image.
Examples
The following example specifies that the M_COLUMN routine in WND:tklib.elb will be called when rcbid is passed to RCB_CALL.
xcall rcb_setfnc(rcbid, "M_COLUMN", "WND:tklib.elb")
The example below specifies that M_LDCOL will be called when rcbid is passed to RCB_CALL.
xcall rcb_setfnc(rcbid, "M_LDCOL")
Also see %RCB_CALL Examples.