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, and

  2. invoke (call) them from the position where the dynamic string should be inserted.
REXX code is defined using the <REXX>...</REXX> tag within the <HEAD>...</HEAD> block. While reading the HEAD of a script, WarpIN stores the REXX code sections internally with the function name given in the NAME attribute.

After that, the stored REXX code can be invoked as part of many other tags, either in the attributes or in the block section or even both using the following syntax:

=("MyREXXCode parameter1 parameter2")

where "MyREXXCode" is the name under which the code was defined. The parameter(s) is/are passed to the REXX code when it is called.

The whole =(...) construct is then replaced with the returned value of the call. This means in other words you can think about the =(...) section as a variable part of the script which is only filled in just before the script code is being interpreted. It is of course possible not to return any value (or an empty string), which results in just calling the code and then removing the call from the script.