The DEFAULT option specifies defaults for attributes and options. These defaults are applied only when the attributes or options are not specified or implied in the source code.
>>-DEFAULT--(---------------------------------------------------> >--+------------------------------------------------+--)------->< | .-+---+--------------------------------------. | | | '-,-' | | | V .-ALIGNED---. | | '---+-+-UNALIGNED-+--------------------------+-+-' | .-IBM-. | +-+-ANS-+--------------------------------+ | .-EBCDIC-. | +-+-ASCII--+-----------------------------+ | .-ASSIGNABLE----------------------. | +-+-NONASSIGNABLE--(--+--------+--)-+----+ | +-INONLY-+ | | '-STATIC-' | | .-BIN1ARG---. | +-+-NOBIN1ARG-+--------------------------+ | .-BYADDR--. | +-+-BYVALUE-+----------------------------+ | .-NONCONNECTED-. | +-+-CONNECTED----+-----------------------+ | .-DESCLOCATOR-. | +-+-DESCLIST----+------------------------+ | .-DESCRIPTOR---. | +-+-NODESCRIPTOR-+-----------------------+ | .-ALIGNED-------. | +-DUMMY--(--+-+-----------+-+--)---------+ | '-UNALIGNED-' | | .-HEXADEC--. | +-E--(--+-+------+-+--)------------------+ | '-IEEE-' | | .-EVENDEC---. | +-+-NOEVENDEC-+--------------------------+ | .-HEXADEC--. | +-+-+------+-+---------------------------+ | '-IEEE-' | | .-NOINITFILL-------------------------. | +-+-INITFILL--+----------------------+-+-+ | '-(----init_value----)-' | | .-NOINLINE-. | +-+-INLINE---+---------------------------+ | .-OPTLINK----. | +-LINKAGE--(--+-+--------+-+--)----------+ | '-SYSTEM-' | | .-LOWERINC-. | +-+-UPPERINC-+---------------------------+ | .-NATIVE----. | +-+-NONNATIVE-+--------------------------+ | .-NATIVEADDR----. | +-+-NONNATIVEADDR-+----------------------+ | .-NULL370-. | +-+-NULLSYS-+----------------------------+ | .-NULLSTRADDR---. | +-+-NONULLSTRADDR-+----------------------+ | .-NULL----. | +-NULLSTRPTR--(--+-STRICT--+--)----------+ | '-SYSNULL-' | | .-REORDER-. | +-+-ORDER---+----------------------------+ | .-MIN-. | +-ORDINAL--(--+-MAX-+--)-----------------+ | .-NOOVERLAP-. | +-+-OVERLAP---+--------------------------+ | .-NOPADDING-. | +-+-PADDING---+--------------------------+ | .-PSEUDODUMMY---. | +-+-NOPSEUDODUMMY-+----------------------+ | .-NONRECURSIVE-. | +-+-RECURSIVE----+-----------------------+ | .-NORETCODE-. | +-+-RETCODE---+--------------------------+ | .-BYADDR------. | +-RETURNS--(--+-+---------+-+--)---------+ | '-BYVALUE-' | | .-HEXADEC--. | '-SHORT--(--+-+------+-+--)--------------' '-IEEE-'
ABBREVIATIONS: DFT, ASGN, NONASGN, NONCONN, CONN, INL, NOINL
If you specify ALIGNED, all variables other than character, bit, graphic, and picture are given the ALIGNED attribute unless the UNALIGNED attribute is explicitly specified (possibly on a parent structure) or implied by a DEFAULT statement.
If you specify UNALIGNED, all variables are given the UNALIGNED attribute unless the ALIGNED attribute is explicitly specified (possibly on a parent structure) or implied by a DEFAULT statement.
ALIGNED is the default.
Attributes | DEFAULT(IBM) | DEFAULT(ANS) |
---|---|---|
FIXED DECIMAL | (5,0) | (10,0) |
FIXED BINARY | (15,0) | (31,0) |
FLOAT DECIMAL | (6) | (6) |
FLOAT BINARY | (21) | (21) |
Under the IBM suboption, the default for variables with names beginning from I to N is FIXED BINARY, and the default for any other variables is FLOAT DECIMAL. If you select the ANS suboption, the default for all variables is FIXED BINARY.
IBM is the default.
Specify ASCII only when compiling programs that depend on the ASCII character set collating sequence. Such a dependency exists, for example, if your program relies on the sorting sequence of digits or on lowercase and uppercase alphabetics. This dependency also exists in programs that create an uppercase alphabetic character by changing the state of the high-order bit.
'123'A is the same as '313233'X
'123'E is the same as 'F1F2F3'X
EBCDIC is the default.
ASSIGNABLE is the default.
The INONLY and STATIC suboptions have no effect on either variables with the ASSIGNABLE or NONASSIGNABLE attribute or structure members that inherit the ASSIGNABLE or NONASSIGNABLE attribute from a parent.
BYVALUE parameters are given the INONLY attribute after the resolution of the (NON)ASSIGNABLE attribute, and hence the NONASSIGNABLE(INONLY) suboption has no effect on BYVALUE parameters.
To specify the NONASSIGNABLE attribute to both STATIC and INONLY variables, you must specify the suboption NONASSIGNABLE(STATIC INONLY).
The NONASSIGNABLE attribute can be specified without any suboptions, in which case it means NONASSIGNABLE(STATIC).
Under BIN1ARG, the compiler passes a FIXED BIN argument as is to an unprototyped function.
But under NOBIN1ARG, the compiler assigns any 1-byte REAL FIXED BIN argument passed to an unprototyped function to a 2-byte FIXED BIN temporary and pass that temporary instead.
dcl f1 ext entry;
dcl f2 ext entry( fixed bin(15) );
call f1( 1b );
call f2( 1b );
If you specify DEFAULT(BIN1ARG), the compiler passes the address of a 1-byte FIXED BIN(1) argument to the routine f1 and the address of a 2-byte FIXED BIN(15) argument to the routine f2. However, if you specify DEFAULT(NOBIN1ARG), the compiler passes the address of a 2-byte FIXED BIN(15) argument to both routines.
Note that if the routine f1 is a COBOL routine, passing a 1-byte integer argument to it might cause problems because COBOL has no support for 1-byte integers. In this case, using DEFAULT(NOBIN1ARG) might be helpful; but it might be better to specify the argument attributes in the entry declare statement.
BIN1ARG is the default.
BYADDR is the default.
NONCONNECTED is the default.
If you specify DEFAULT(DESCLOCATOR), parameters requiring descriptors are passed using a locator or descriptor in the same way as previous releases of PL/I. This allows old code to continue to work even if it passes a structure from one routine to a routine that is expecting to receive a pointer.
The DFT(DESCLIST) option conflicts with the CMPAT(V*) options, and if it is specified with any of them, a message will be issued and the DFT(DESCLOCATOR) option will be assumed.
DESCLOCATOR is the default.
DESCRIPTOR is the default.
DUMMY(ALIGNED) indicates that a dummy argument should be created even if an argument differs from a parameter only in its alignment. DUMMY(UNALIGNED) indicates that no dummy argument should be created for a scalar (except a nonvarying bit) or an array of such scalars if it differs from a parameter only in its alignment.
dcl
1 a1 unaligned,
2 b1 fixed bin(31),
2 b2 fixed bin(15),
2 b3 fixed bin(31),
2 b4 fixed bin(15);
dcl x entry( fixed bin(31) );
call x( b3 );
If you specify DEFAULT(DUMMY(ALIGNED)), a dummy argument is created, while if you specify DEFAULT(DUMMY(UNALIGNED)), no dummy argument is created.
DUMMY(ALIGNED) is the default.
If you specify E(IEEE), 4 digits will be used for the exponent in E-format items.
If you specify E(HEXADEC), 2 digits will be used for the exponent in E-format items.
If DFT(E(HEXADEC) ) is specified, an attempt to use an expression whose exponent has an absolute value greater than 99 will cause the SIZE condition to be raised.
If the compiler option DFT(IEEE) is in effect, you should normally also use the option DFT(E(IEEE) ). However, under this option, some E format items that would be valid under DFT(E(HEXADEC) ) are not valid. For instance, under DFT(E(IEEE) ), the statement put skip edit(x) (e(15,8)); will be flagged because the E format item is invalid.
E(HEXADEC) is the default.
Under NOEVENDEC, the precision for any fixed decimal variable is rounded up to the next highest odd number.
If you specify EVENDEC and then assign 123 to a FIXED DEC(2) variable, the SIZE condition is raised. If you specify NOEVENDEC, the SIZE condition is not raised.
EVENDEC is the default.
It is recommended that you use the IEEE option for programs that communicate with JAVA and also for programs that pass data to or receive data from platforms where IEEE is the default representation for floating-point data.
HEXADEC is the default.
If you specify INITFILL with a hex value (nn), that value is used to initialize the storage that is used by all automatic variables in a block each time that block is entered. If you do not enter a hex value, the default is '00'.
Note that the hex value can be specified with or without quotation marks, but if it is specified with quotation marks, the string should not have an X suffix.
Under NOINITFILL, the storage that is used by an automatic variable can hold arbitrary bit patterns unless the variable is explicitly initialized.
INITFILL can cause programs to run slower and should not be specified in production programs. However, the INITFILL option produces code that runs faster than the LE STORAGE option. Also, during program development, this option is useful for detecting uninitialized automatic variables: a program that runs correctly with DFT(INITFILL('00')) and with DFT(INITFILL('ff')) probably has no uninitialized automatic variables.
NOINITFILL is the default.
Specifying INLINE allows your code to run faster but, in some cases, also creates a larger executable file. For more information about how inlining can improve the performance of your application, see Improving performance.
NOINLINE is the default.
Use LINKAGE(OPTLINK) for all routines called by or calling to JAVA and also for all routines called by or calling to C (unless the C code has been compiled with a nondefault linkage).
Use LINKAGE(SYSTEM) for all non-PL/I routines that expect the high-order bit to be on in the address of the last (and only the last) parameter.
Note that specifying OPTIONS(ASSEMBLER) for a PROCEDURE or an ENTRY forces LINKAGE(SYSTEM) regardless of the setting of this option.
LINKAGE(OPTLINK) is the default.
Under z/OS UNIX, the include name is built with the extension .inc. For example, under the DFT(LOWERINC) option, the statement %INCLUDE STANDARD; causes the compiler to try to include standard.inc. But, under the DFT(UPPERINC) option, the statement %INCLUDE STANDARD; causes the compiler to try to include STANDARD.INC.
LOWERINC is the default.
You should specify NONNATIVE only to compile programs that depend on the nonnative format for holding these kind of variables.
If your program bases fixed binary variables on pointer or offset variables (or conversely, pointer or offset variables on fixed binary variables), specify either of the following combinations of suboptions:
Other combinations produce unpredictable results.
NATIVE is the default.
If your program bases fixed binary variables on pointer or offset variables (or conversely, pointer or offset variables on fixed binary variables), specify either of the following combinations of suboptions:
Other combinations produce unpredictable results.
NATIVEADDR is the default.
NULL370 is the default.
Under NULLSTRADDR, when a null string is specified as an argument in an entry invocation, the compiler will pass the address of an initialized piece of automatic storage. This is compatible with what the OS PL/I and PL/I for MVS™ compilers did.
But under NONULLSTRADDR, when a null string is specified as an argument in an entry invocation, the compiler passes a null pointer as the address of the argument. This is compatible with what early releases of the Enterprise PL/I compiler did.
NULLSTRADDR is the default.
Under NULLSTRPTR(SYSNULL), the result of assigning '' to a POINTER is the same as assigning SYSNULL() to the pointer.
Under NULLSTRPTR(NULL), the result of assigning '' to a POINTER is the same as assigning NULL() to the pointer.
Under NULLSTRPTR(STRICT), assignments and comparisons of '' to POINTERs are flagged as invalid.
NULLSTRPTR(NULL) is the default.
REORDER is the default.
ORDINAL(MIN) is the default.
The OVERLAP suboption applies only to string variables. It has no effect on assignments of FIXED DECIMAL or other variable types. In those assignments, the source and target must not overlap.
NOOVERLAP produces code that performs better; however, if you use NOOVERLAP, you must ensure that the source and target never overlap.
NOOVERLAP is the default.
If you specify DEFAULT( PADDING ), the compiler will round up the size of any structures in DEFINE STRUCT statements so that they occupy a multiple of their alignment.
If you specify DEFAULT( NOPADDING ), the compiler will not perform this rounding but will flag defined structures whose size are not a multiple of their alignment.
DEFAULT( PADDING ) is recommended and must be used when defined structures are passed to C routines.
NOPADDING is the default.
If you specify PSEUDODUMMY, dummy arguments are created when a SUBSTR reference is specified as an argument to an unprototyped function.
If you specify NOPSEUDODUMMY, dummy arguments are not created when a SUBSTR reference is specified as an argument to an unprototyped function.
PSEUDODUMMY is the default.
NONRECURSIVE is the default.
If you specify NORETCODE, no special code is generated for procedures that do not have the RETURNS attribute.
NORETCODE is the default.
You must specify RETURNS(BYADDR) if your application contains ENTRY statements and the ENTRY statements or the containing procedure statement have the RETURNS option. You must also specify RETURNS(BYADDR) on the entry declarations for such entries.
RETURNS(BYADDR) is the default.
SHORT (HEXADEC) is the default.
Default: DEFAULT(ALIGNED IBM EBCDIC ASSIGNABLE BIN1ARG BYADDR NONCONNECTED DESCLOCATOR DESCRIPTOR DUMMY(ALIGNED) E(HEXADEC) EVENDEC HEXADEC NOINITFILL NOINLINE LINKAGE(OPTLINK) LOWERINC NATIVE NATIVEADDR NULL370 NULLSTRPTR(NULL) NULLSTRADDR REORDER ORDINAL(MIN) NOOVERLAP NOPADDING PSEUDODUMMY NONRECURSIVE NORETCODE RETURNS(BYADDR) SHORT(HEXADEC))