This function determines the availability of an IMOD subroutine before you try calling it.
address {GOOD|BAD} {CALL|NCALL} {SOURCE|NSOURCE} = LOCIMOD(imodname)
Parameters
Memory address for the IMOD (in REXX decimal format).
IMOD was successfully loaded and is executable.
An error occurred during IMOD loading and the requested IMOD is not executable.
IMOD is available to be called as a subroutine from another IMOD.
IMOD cannot be called as a subroutine from another IMOD.
Source code for the IMOD is in memory and is available to the SOURCELINE() function and TRACE facility.
Source code for the IMOD was not loaded into memory and is not available to the SOURCELINE() function or TRACE facility.
Name of the IMOD to be tested. This argument is not case-sensitive.
An IMOD that has not been loaded sets RC to 121. An IMOD that has been loaded but is not currently available sets RC to 0 and returns BAD as the status.
ARG 1 MISSING OR INVALID
NOT FOUND
Example
/* Conditionally send a message to a logging subroutine. If the subroutine is not available, issue the message as a WTO */ parse arg msg status = locimod('log_routine') if RC = 0 then do parse var status w1 w2 w3 . if w1 = 'BAD' then RC = 121 if w2 = 'NCALL' then RC = 121 end if RC = 0 then do call log_routine msg return end x = wto(msg) return
Copyright © 2014 CA Technologies.
All rights reserved.
|
|