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


Using the AXREXX macro

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

If HWIREXX does not provide the options for your REXX exec requires, you can run your REXX exec using the AXREXX macro from the System REXX programming environment.

For example, an assembler program running in supervisor state, PKM 0-7, or APF-authorized can invoke the AXREXX macro to execute a REXX exec as follows:
AXREXX 	REQUEST=EXECUTE,
			NAME=execname,          <--- 8-character name of REXX exec
			TSO=NO,                 <--- Runs in a standard MVS host command environment
			REXXARGS=rexxargs,      <--- Input/output parmeters mapped by AXRARGLST
			REXXOUTDSN=outdsn,      <--- Specify output data set
			REXXOUTMEMNAME=memname, <--- Specify output member name
			RETCODE=retcode,        <--- R15 as a result of REXX exec
			RSNCODE=rsncode,        <--- R10 as a result of REXX exec
			TIMELIMIT=[YES,NO],     <--- Do you want the REXX exec to timeout?
			TIMEINT=numofsecs       <--- If TIMELIMIT=YES, how much time to wait?

After the invocation of the above AXREXX macro, the REXX exec gets control and the input parameters are passed to the REXX exec. If any output is generated from the exec, it is directed to the specified output data set and member name. Lastly, the return code and reason code are returned.

For a complete description of the AXREXX macro and its usage, see z/OS MVS Programming: Authorized Assembler Services Guide and z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN. For a BCPii example showing the invocation of the AXREXX macro, see SAMPLIB member HWIXMRA1.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014