z/OS MVS Programming: Callable Services for High-Level Languages
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


REXX Programming tips

z/OS MVS Programming: Callable Services for High-Level Languages
SA23-1377-02

When programming a BCPii application using REXX, see the specific REXX programming considerations for each individual BCPii callable service for all necessary interface distinctions. Users of the BCPii REXX interface should be aware of the following:
  • All parameters passed on BCPii REXX service calls must be REXX variables. Literals are not supported (for example, a variable name which has been assigned the value of a ListType should be specified on the call instead of the value itself).
  • Variable names specified on BCPii REXX service calls are limited to 40 characters in length.
  • Output variables specified on BCPii REXX service calls may be initialized or un-initialized. On input, the value of output variables are not verified. Output variables are initialized and set by BCPii.
  • If the value of an input variable is incompatible with the parameter type required on a particular BCPii REXX service call, an error is flagged. See the REXX programming considerations for each BCPii callable service for the specific interface distinctions.
  • The DiagArea for each BCPii REXX service call is returned using stem variables in the form: x.Diag_Index, x.Diag_Key, x.Diag_Actual, x.Diag_Expected, x.Diag_CommErr and x.Diag_Text (where x is the name of the stem variable specified on the parameter list). If no DiagArea information is filled in by BCPii, the value of the DiagArea stem-variable on return is all blanks.
  • Stem variables utilized by BCPii have hard-coded stem variable tail values which usually correspond to the documented parameter name. For example, the QueryParm. stem must be prepared in REXX with the exact stem variable "ATTRIBUTEIDENTIFIER".
  • The ConnectToken parameter returned on the HWICONN call and passed as input on all subsequent services contains non-displayable characters. Ensure that this ConnectToken is untouched by the REXX exec, thereby allowing subsequent BCPii services to read the value correctly.
  • For System REXX execs only: Consider the length of time necessary to run your BCPii REXX exec. BCPii applications are interacting with the CPC's support element. Therefore, BCPii REXX execs may take longer to run than other REXX execs. To avoid having your BCPii REXX application end prematurely, even when the amount of time calculated is reasonable to complete your BCPii REXX exec, consider using the TIMELIMIT and TIMEINT keywords on the AXREXX service call. The default TIMELIMIT=YES, TIMEINT=SYSTEM causes the REXX exec to stop running after a predetermined amount of time. The TIMEINT value may be increased to give the REXX exec additional time to complete its execution before being timed out by the system. In certain circumstances, it may be necessary to specify TIMELIMIT=NO to prevent the REXX exec from timing out. This option should be used with caution as System REXX has a finite number of system-wide regions where the System REXX execs are executed. If TIMELIMIT=NO is specified unnecessarily, this could eventually lead to a constrained System REXX environment.
  • BCPii connections created under System REXX can be used by any program running in the address space of the connector (Address space affinity). BCPii connections created under the TSO/E or ISV-provided REXX environments can only be used by the same task as the connector (Task affinity). See BCPii connection scope for detailed information.
  • BCPii requires all callers to be program-authorized. REXX execs in the zFS cannot run as APF-authorized when invoked from the shell. Therefore, any calls to BCPii services from REXX execs in this environment will result in a HWI_AUTH_FAILURE return code.
  • The built-in REXX RC variable contains the return code from the REXX BCPii host command. This return code indicates BCPii's acceptance of the supplied REXX BCPii host command. The return codes returned in the RC variable are generally unique to the REXX environment. In contrast, the BCPii service return code, the variable supplied on the service call itself, is only filled in if the RC variable has a value of HWI_OK (0) or HWI_REXXParmSyntaxError (1). Possible return codes returned by BCPii in the RC variable are:

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014