DEFAULT

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.

Read syntax diagramSkip visual syntax diagram
>>-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

ALIGNED | UNALIGNED
This suboption forces byte-alignment on all of your variables.

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.

IBM | ANS
The suboption specifies whether to use IBM defaults or ANS SYSTEM defaults. The following table shows the arithmetic defaults for IBM and ANS.
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.

ASCII | EBCDIC
This suboption sets the default for the character set used for the internal representation of character problem program data.

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.

Note: The compiler supports A and E as suffixes on character strings. The A suffix indicates that the string is meant to represent ASCII data, even if the EBCDIC compiler option is in effect. Alternately, the E suffix indicates that the string is EBCDIC, even when you select DEFAULT(ASCII).
  '123'A is the same as '313233'X
  '123'E is the same as 'F1F2F3'X

EBCDIC is the default.

ASSIGNABLE | NONASSIGNABLE
This option causes the compiler to apply the specified attribute to all static variables that are not declared with the ASSIGNABLE or NONASSIGNABLE attribute. The compiler flags statements in which NONASSIGNABLE variables are the targets of assignments.

ASSIGNABLE is the default.

INONLY
Specifying NONASSIGNABLE(INONLY) indicates that parameters declared with the INONLY attribute are given the NONASSIGNABLE attribute.
STATIC
Specifying NONASSIGNABLE(STATIC) indicates that STATIC variables are given the NONASSIGNABLE attribute.

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).

BIN1ARG | NOBIN1ARG
This suboption controls how the compiler handles 1-byte REAL FIXED BIN arguments passed to an unprototyped function.

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.

Consider the following example:
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 | BYVALUE
This suboption sets the default for whether arguments or parameters are passed by reference or by value. BYVALUE applies only to certain arguments and parameters. See the PL/I Language Reference for more information.

BYADDR is the default.

CONNECTED | NONCONNECTED
This suboption sets the default for whether parameters are connected or nonconnected. CONNECTED allows the parameter to be used as a target or source in record-oriented I/O or as a base in string overlay defining.

NONCONNECTED is the default.

DESCLIST | DESCLOCATOR
When you specify DEFAULT(DESCLIST), the compiler passes all descriptors in a list as a 'hidden' last parameter.

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 | NODESCRIPTOR
Using DESCRIPTOR with a PROCEDURE indicates that a descriptor list was passed, while DESCRIPTOR with ENTRY indicates that a descriptor list should be passed. NODESCRIPTOR results in more efficient code, but has the following restrictions:
  • For PROCEDURE statements, NODESCRIPTOR is invalid if any of the parameters contains the following:
    • An asterisk (*) specified for the bound of an array, the length of a string, or the size of an area except if it is a VARYING or VARYINGZ string with the NONASSIGNABLE attribute
    • The NONCONNECTED attribute
    • The UNALIGNED BIT attribute
  • For ENTRY declarations, NODESCRIPTOR is invalid if an asterisk (*) is specified for the bound of an array, the length of a string, or the size of an area in the ENTRY description list.

DESCRIPTOR is the default.

DUMMY(ALIGNED | UNALIGNED)
This suboption reduces the number of situations in which dummy arguments get created.

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.

Consider the following example:
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.

E (HEXADEC | IEEE)
The E suboption determines how many digits will be used for the exponent in E-format items.

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.

EVENDEC | NOEVENDEC
This suboption controls the compiler's tolerance of fixed decimal variables declared with an even precision.

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.

HEXADEC | IEEE
This suboption specifies the default representation that is used to hold all FLOAT variables and all floating-point intermediate results. This suboption also determines whether the compiler evaluates floating-point expressions using the hexadecimal or IEEE float instructions and math routines.

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.

INITFILL | NOINITFILL
This suboption controls the default initialization of automatic variables.

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.

INLINE | NOINLINE
This option sets the default for the inline procedure option.

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.

LINKAGE
Here is the linkage convention for procedure invocations:
OPTLINK
The default linkage convention for Enterprise PL/I. This linkage provides the best performance.
SYSTEM
The standard linking convention for system APIs.

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.

Note: The LINKAGE suboption is ignored under the LP(64) option.
LOWERINC | UPPERINC
If you specify LOWERINC, the compiler requires that the actual file names of INCLUDE files are in lowercase. If you specify UPPERINC, the compiler requires that the names are in uppercase.
Note: This suboption applies only to compilations under z/OS® UNIX.

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.

NATIVE | NONNATIVE
This suboption affects only the internal representation of fixed binary, ordinal, offset, area, and varying string data. When the NONNATIVE suboption is in effect, the NONNATIVE attribute is applied to all such variables not declared with the NATIVE attribute.

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:

  • Both the NATIVE and NATIVEADDR suboptions
  • Both the NONNATIVE and NONNATIVEADDR suboptions.

Other combinations produce unpredictable results.

NATIVE is the default.

NATIVEADDR | NONNATIVEADDR
This suboption affects only the internal representation of pointers. When the NONNATIVEADDR suboption is in effect, the NONNATIVE attribute is applied to all pointer variables not declared with the NATIVE attribute.

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:

  • Both the NATIVE and NATIVEADDR suboptions
  • Both the NONNATIVE and NONNATIVEADDR suboptions.

Other combinations produce unpredictable results.

NATIVEADDR is the default.

NULLSYS | NULL370
This suboption determines which value is returned by the NULL built-in function. If you specify NULLSYS, binvalue(null()) is equal to 0. If you specify NULL370, binvalue(null()) is equal to 'FF_00_00_00'xn under LP(32) and equal to '00000000_7FFFFBAD'xn under LP(64).

NULL370 is the default.

NULLSTRADDR | NONULLSTRADDR
This suboption controls how the compiler handles null strings when null strings are passed as arguments.

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.

NULLSTRPTR
This suboption controls how the compiler handles null strings when null strings are assigned to POINTERs.

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.

ORDER | REORDER
This suboption affects the optimization of the object code. Specifying REORDER allows more optimization of your code. For detailed information, see Improving performance.

REORDER is the default.

ORDINAL(MIN | MAX)
If you specify ORDINAL(MAX), all ordinals whose definition does not include a PRECISION attribute is given the attribute PREC(31). Otherwise, they are given the smallest precision that covers their range of values.

ORDINAL(MIN) is the default.

OVERLAP | NOOVERLAP
If you specify OVERLAP, the compiler presumes the source and target in an assignment can overlap and generates, as needed, extra code in order to ensure that the result of the assignment is okay.

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.

PADDING | NOPADDING
This suboption determines whether defined structures are padded.

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.

PSEUDODUMMY | NOPSEUDODUMMY
This suboption determines whether dummy arguments are created when a SUBSTR reference is specified as an argument to an unprototyped function.

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.

RECURSIVE | NONRECURSIVE
When you specify DEFAULT(RECURSIVE), the compiler applies the RECURSIVE attribute to all procedures. If you specify DEFAULT(NONRECURSIVE), all procedures are nonrecursive except procedures with the RECURSIVE attribute.

NONRECURSIVE is the default.

RETCODE | NORETCODE
If you specify RETCODE, for any external procedure that does not have the RETURNS attribute, the compiler will generate extra code so that the procedure returns the integer value obtained by invoking the PLIRETV built-in function just before returning from that procedure.

If you specify NORETCODE, no special code is generated for procedures that do not have the RETURNS attribute.

NORETCODE is the default.

RETURNS (BYVALUE | BYADDR)
This suboption sets the default for how values are returned by functions. See the PL/I Language Reference for more information.

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 | IEEE)
This suboption improves compatibility with other non-IBM UNIX compilers. SHORT (HEXADEC) maps FLOAT BIN (p) to a short (4-byte) floating point number if p <= 21. SHORT (IEEE) maps FLOAT BIN (p) to a short (4-byte) floating point number if p <= 24.

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))






Published: 23 December 2018