Most interpreters support various optional features that may be turned on or off within the script. A feature is turned on or off via the OPTIONS keyword.

Every option is given a name. For example, perhaps the interpreter has an option whereby LINEOUT() truncates (ie, discards) any data that may have been after the point at which you wrote a line to the file. The name of this option may be EXT_LINEOUTTRUNC.

To turn on a feature, simply list its name after the OPTIONS keyword. Make sure that you enclose the name in quotes so that REXX doesn't mistake it for a variable name. Here, we turn on the EXT_LINEOUTTRUNC feature:

OPTIONS 'EXT_LINEOUTTRUNC'
Of course, you could use a variable if desired:
MyOptions = 'EXT_LINEOUTTRUNC'
OPTIONS MyOptions
To turn off a feature, preface its name with 'NO'. Here, we turn off the EXT_LINEOUTTRUNC feature:
OPTIONS 'NOEXT_LINEOUTTRUNC'
You can turn on and off numerous options with one OPTION statement. Simply separate each desired option with one or more spaces. For example, where we turn off the EXT_LINEOUTTRUNC option and turn on the LABELCHECK option:
OPTIONS 'NOEXT_LINEOUTTRUNC LABELCHECK'
Different interpreters may have different optional features with different names. You'll have to consult the documentation with your interpreter. But, all interpreters use the OPTIONS keyword to turn features on or off from within a script. Note though, that if the user runs the script with a different interpreter than you use, the optional features may not be the same. In this case, the interpreter will ignore any attempt to enable an option it doesn't support (and your script will run without that option turned on. Unfortunately, there is no way to know whether your attempt to turn on an option succeeds or fails).

Note: For Reginald, the REXX Administration Tool's help book (under the Tool's "Help -> Contents" menu) lists all of the various optional features, and even lets you set them globally for all scripts if desired, so that you don't necessarily have to use the OPTIONS keyword in individual scripts. But for scripts that you intend to distribute to others, you may wish to explicitly use the OPTIONS keyword to enforce a feature that your script depends upon (and note if you require an option that is supported only by a particular interpreter).