IBM SC34-5764-01 Server User Manual


 
OPTIONS
Purpose
 OPTIONS expression ; 
OPTIONS passes special requests or parameters to the language processor. For example, these may be
language processor options or perhaps define a special character set.
The expression is evaluated, and the result is examined one word at a time. The language processor
converts the words to uppercase. If the language processor recognizes the words, then they are obeyed.
Words that are not recognized are ignored and assumed to be instructions to a different processor.
The language processor recognizes the following words:
ETMODE
specifies that literal strings and symbols and comments containing DBCS characters are checked
for being valid DBCS strings. If you use this option, it must be the first instruction of the program.
If the expression is an external function call, for example OPTIONS 'GETETMOD'(), and the program
contains DBCS literal strings, enclose the name of the function in quotation marks to ensure that
the entire program is not scanned before the option takes effect. It is not recommended to use
internal function calls to set ETMODE because of the possibility of errors in interpreting DBCS
literal strings in the program.
NOETMODE
specifies that literal strings and symbols and comments containing DBCS characters are not
checked for being valid DBCS strings. NOETMODE is the default. The language processor ignores
this option unless it is the first instruction in a program.
EXMODE
specifies that instructions, operators, and functions handle DBCS data in mixed strings on a logical
character basis. DBCS data integrity is maintained.
NOEXMODE
specifies that any data in strings is handled on a byte basis. The integrity of DBCS characters, if
any, may be lost. NOEXMODE is the default.
Notes:
1. Because of the language processor's scanning procedures, you must place an OPTIONS 'ETMODE'
instruction as the first instruction in a program containing DBCS characters in literal strings, symbols,
or comments. If you do not place OPTIONS 'ETMODE' as the first instruction and you use it later in the
program, you receive error message CICREXX488E. If you do place it as the first instruction of your
program, all subsequent uses are ignored. If the expression contains anything that would start a label
search, all clauses tokenized during the label search process are tokenized within the current setting of
ETMODE. Therefore, if this is the first statement in the program, the default is NOETMODE.
2. To ensure proper scanning of a program containing DBCS literals and DBCS comments, enter the
words ETMODE, NOETMODE, EXMODE, and NOEXMODE as literal strings (that is, enclosed in
quotation marks) in the OPTIONS instruction.
3. The EXMODE setting is saved and restored across subroutine and function calls.
4. To distinguish DBCS characters from 1-byte EBCDIC characters, sequences of DBCS characters are
enclosed with a shift-out (SO) character and a shift-in (SI) character. The hexadecimal values of the
SO and SI characters are X'0E' and X'0F', respectively.
5. When you specify OPTIONS 'ETMODE', DBCS characters within a literal string are excluded from the
search for a closing quotation mark in literal strings.
6. The words ETMODE, NOETMODE, EXMODE, and NOEXMODE can appear several times within the
result. The one that takes effect is determined by the last valid one specified between the pairs
ETMODE-NOETMODE and EXMODE-NOEXMODE.
OPTIONS
Chapter 13. Keyword Instructions 151