Writing a Script
Scripts are written in REXX language and must adhere to REXX syntax rules. Use a text editor to write the scripts and store them in the following library:
<prefix>.<version>.USER.CLIST
where:
-
<prefix>
– Value set in parameter OLPREFS in member LOADCTS in the Connector INSTALL library. -
<version>
– Value set in parameter OLVERS in member LOADCTS in the Connector INSTALL library.
Note
This library name is defined in parameter SCRIPT_DIR in member RSSPARM stored in the Connector PARM library.
Scripts may be executed before and/or after a Connector for ACF2 function is executed (see Executing a Script for details). All scripts are activated under the Connector for ACF2 address space.
A script should consist of the following sequence of actions:
-
Read the current Connector for ACF2 variables into REXX variables.
-
Examine the REXX variables, modify them (if required) and execute additional actions as required.
-
Update the Connector for ACF2 variables with the resultant REXX variable values.
To enable the script to manipulate Connector for ACF2 variables, Connector for ACF2 provides the script command CTSAVAR which reads the current Connector for ACF2 variables into REXX variables. After the REXX variables have been examined and modified, the script command CTSAVAR is used to update the Connector for ACF2 variables with the resultant REXX variable values. Script commands are described later in this chapter.
Since the script is executed in the TSO-REXX environment, Connector for ACF2 scripts can also issue TSO and REXX commands.
When writing a script, the following must be taken into account:
-
Certain variables are unmodifiable. For more information, see Script Variables.
-
The return code of a script must be set by the script before it terminates for more information see Setting the Return Code.
-
Several TSO commands can only be issued indirectly from within a Connector for ACF2 script. For more information, see TSO Considerations.
-
Due to REXX limitations, field names for keywords must be all uppercase. This applies both when defining keywords in SailPoint and when specifying the field name of the keyword in a script.
-
The simplest way to return a message from a script to SailPoint is by issuing a SAY REXX command with the relevant text.
For example:
SAY "THIS IS AN ERROR MESSAGE…"
Note
For SailPoint to display this message, the transaction should complete with a non-zero return code.