The REXX language environment can interpret inline REXX programs that are specified in a FUNCTION block of the Net.Data macro, or it can execute external REXX programs stored in separate files. Calls to external REXX programs are identified in a FUNCTION block by a statement, for example:
%EXEC{ REXX-program-file-name [optional parameters] %}
The REXX language environment uses the RexxStart() API to tell the REXX interpreter to execute the specified file, then passes the parameters following the file name to the program as if they were entered on the command line. To the REXX program, all of the parameters are received as ARG[1].
Authorization Tip: Ensure that the user ID under which Net.Data executes has access rights to any external executable files referenced language environments. See the section on specifying Web server access rights to Net.Data files in the configuration chapter of Net.Data Administration and Programming Guide for more information.
Variable Substitution:
Variable substitution is performed only on the executable-statements section of the FUNCTION block. Parameters, however, are made accessible to the REXX program whether the program is defined internally in a FUNCTION block or externally in a separate file. The REXX language environment uses the REXX language processors' RexxVariablePool() function to share Net.Data variables with the REXX program. This allows the REXX program to directly manipulate the Net.Data variables identified in the parameter list.
A REXX program accesses the values of a table parameter as REXX stem variables. To a REXX program, the column headings for table T are T_N.i and the field values are T_V.i.j. The number of rows and columns in table T are T_ROWS and T_COLS.
Improving Performance for the AIX operating system:
If you have many calls to the REXX language environment on your AIX system, consider setting the RXQUEUE_OWNER_PID environment variable to 0. Macros that make many calls to the REXX language environment can easily spawn many processes, swamping system resources.
You can set the environment variable in one of three ways:
@DTW_rSETENV("RXQUEUE_OWNER_PID", "0")
/etc/environment: RXQUEUE_OWNER_PID = 0
This method affects the behavior of REXX for the whole machine.
InheritEnv RXQUEUE_OWNER_PID = 0
This method affects the behavior of REXX for the Web server.