The #OPTION compiler command controls the PSL constructs that are accepted or generated by the compiler. For most #OPTION settings, there is no need to override the environment default.
Syntax
#OPTION optionname ON|OFF
Parameters
optionname |
One or more option names, separated by commas, that identify the feature that should be turned ON or OFF. The default is all options. However, because the recommended environment settings for individual options differ, it is strongly recommended not to use this default. Valid option names are:
Recommended settings: - Development environments for Version 6.4 and lower: ON - Development environments for Version 7.0 and higher: OFF - Production environments for Version 6.4 and lower: ON - Production environments for Version 7.0 and higher: OFF
Recommended settings: - Development environments for Version 6.4 and lower: ON - Development environments for Version 7.0 and higher: OFF - Production environments for Version 6.4 and lower: ON - Production environments for Version 7.0 and higher: OFF
Recommended settings: - Development environments for Version 6.4 and lower: ON - Development environments for Version 7.0 and higher: OFF - Production environments for Version 6.4 and lower: ON - Production environments for Version 7.0 and higher: OFF
PSL source code that specifies the ResultClass is syntactically incompatible with PSL source code that does not specify the ResultClass, so this option must be turned ON or OFF on a PSL source code function basis. Because the existing PSL code base does not specify the ResultClass, the current PSL release uses OFF as the default setting. Recommended settings: - Development environments for Version 6.4 and lower: OFF - Development environments for Version 7.0 and higher: OFF - Production environments for Version 6.4 and lower: OFF - Production environments for Version 7.0 and higher: OFF |
ON|OFF |
Specifies whether the option is to be turned ON or OFF. |
When Became Available
Profile v7.0
Example
#OPTION ResultClass ON // ResultClass required after this line
public String getDQsig( String line) // Return DQ signature
/* ---------------------------------------------------------------------
Get the 'DATA-QWIK' signature of the line, that identifies
a unit as a DATA-QWIK generated unit.
RETURNS:
$$ "DATA-QWIK" + the text following it if line contains the DQ signature.
"" Otherwise
*/
if '$$isDQsig( line) quit ""
quit line.extract( line.find("from DATA-QWIK")-9, line.length())
public void getLabels( String rtn, // routine
PSLLabelRecord labels(), // label records
Boolean bWithRtn) // with or without routinename
/* ---------------------------------------------------------------------
Extract labels from the specified routine.
*/
type String src()
type Number res = $$getSrc( rtn, .src())
if res<2 do getLblRec^UCPSLLR(src(), $S(bWithRtn:rtn,1:""), 0, .labels())
quit
#OPTION ResultClass OFF // ResultClass not allowed after this line
public getDQname( String sig) // DQ signature
/* ---------------------------------------------------------------------
Extract the element name from the DQ signature.
RETURNS:
$$ the element name (third word in DQ signature)
*/
quit sig.piece(" ",3)