In a WarpIN installation script, any REXX code is called before the script segment is interpreted. Any REXX calls in the script will be replaced with the return value of the called function or deleted from the script if no value is returned.

With WarpIN's REXX support, you can therefore dynamically alter the contents of an installation script. If you are familiar with JavaScript: this can simulate the functionality of the document.write() method, but this could also be used to execute any other REXX code.

To use WarpIN's REXX support, you need to do two things in your script:

  1. Define REXX functions, which optionally can return a string which is meaningful in a WarpIN installation script.

    REXX code is defined using REXX blocks.

  2. Invoke (call) the functions from the position where the dynamic string should be inserted. This is done using the following syntax:

    =("functionname [parameters]")

    where functionname must match the function name of an existing REXX element. The parameters are optional and can be parsed in the REXX code using the standard REXX parse function.

If any REXX elements are found in the script, WarpIN will do the following:
  1. While reading a script, WarpIN stores the REXX code sections internally with the function name given in the NAME attribute of the REXX element.

  2. Invoke all REXX function calls found in the script. All REXX function calls are replaced with the return values of the respective REXX function which was called. If the REXX function returned nothing, the function call is simply removed.

  3. The modified script is then parsed a second time.
In other words, you can think about the =(...) sections as variable parts of the script which are only filled in just before the script code is being interpreted.