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:
<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.