Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

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.

Read syntax diagramSkip visual syntax diagram>>-DEFAULT--(--------------------------------------------------->
 
>--+------------------------------------------------+--)-------><
   | .-+---+--------------------------------------. |
   | | '-,-'                                      | |
   | V   .-IBM-.                                  | |
   '---+-+-ANS-+--------------------------------+-+-'
       | .-EBCDIC-.                             |
       +-+-ASCII--+-----------------------------+
       | .-ASSIGNABLE----.                      |
       +-+-NONASSIGNABLE-+----------------------+
       | .-BYADDR--.                            |
       +-+-BYVALUE-+----------------------------+
       | .-NONCONNECTED-.                       |
       +-+-CONNECTED----+-----------------------+
       | .-DESCRIPTOR---.                       |
       +-+-NODESCRIPTOR-+-----------------------+
       | .-NATIVE----.                          |
       +-+-NONNATIVE-+--------------------------+
       | .-NATIVEADDR----.                      |
       +-+-NONNATIVEADDR-+----------------------+
       | .-NOINLINE-.                           |
       +-+-INLINE---+---------------------------+
       | .-ORDER---.                            |
       +-+-REORDER-+----------------------------+
       |             .-OPTLINK----.             |
       +-LINKAGE--(--+-+--------+-+--)----------+
       |               '-SYSTEM-'               |
       | .-EVENDEC---.                          |
       +-+-NOEVENDEC-+--------------------------+
       | .-NULL370-.                            |
       +-+-NULLSYS-+----------------------------+
       | .-BIN1ARG---.                          |
       +-+-NOBIN1ARG-+--------------------------+
       | .-NULLSTRADDR---.                      |
       +-+-NONULLSTRADDR-+----------------------+
       | .-NONRECURSIVE-.                       |
       +-+-RECURSIVE----+-----------------------+
       | .-DESCLOCATOR-.                        |
       +-+-DESCLIST----+------------------------+
       |             .-BYADDR------.            |
       +-RETURNS--(--+-+---------+-+--)---------+
       |               '-BYVALUE-'              |
       | .-NOINITFILL-------------------------. |
       +-+-INITFILL--+----------------------+-+-+
       |             '-(----init_value----)-'   |
       |           .-HEXADEC--.                 |
       +-SHORT--(--+-+------+-+--)--------------+
       |             '-IEEE-'                   |
       |           .-ALIGNED-------.            |
       +-DUMMY--(--+-+-----------+-+--)---------+
       |             '-UNALIGNED-'              |
       | .-UPPERINC-.                           |
       +-+-LOWERINC-+---------------------------+
       | .-NORETCODE-.                          |
       +-+-RETCODE---+--------------------------+
       | .-ALIGNED---.                          |
       +-+-UNALIGNED-+--------------------------+
       |             .-MIN-.                    |
       +-ORDINAL--(--+-MAX-+--)-----------------+
       | .-NOOVERLAP-.                          |
       +-+-OVERLAP---+--------------------------+
       | .-HEXADEC--.                           |
       +-+-+------+-+---------------------------+
       |   '-IEEE-'                             |
       |       .-HEXADEC--.                     |
       '-E--(--+-+------+-+--)------------------'
                 '-IEEE-'
 

ABBREVIATIONS: DFT, ASGN, NONASGN, NONCONN, CONN, INL, NOINL

IBM or ANS
Use IBM or ANS SYSTEM defaults. The arithmetic defaults for IBM and ANS are the following:
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, variables with names beginning from I to N default to FIXED BINARY and any other variables default to FLOAT DECIMAL. If you select the ANS suboption, the default for all variables is FIXED BINARY.

IBM is the default.

ASCII | EBCDIC
Use this option to set 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.

BYADDR | BYVALUE
Set the default for whether arguments or parameters are passed by address 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
Set 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.

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:

DESCRIPTOR is the default.

NATIVE | NONNATIVE
This option 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:

Other combinations produce unpredictable results.

NATIVE is the default.

NATIVEADDR | NONNATIVEADDR
This option 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:

Other combinations produce unpredictable results.

NATIVEADDR 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 on how inlining can improve the performance of your application, see Improving performance.

NOINLINE is the default.

ORDER | REORDER
Affects optimization of the source code. Specifying REORDER allows further optimization of your source code, see Improving performance.

ORDER is the default.

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

LINKAGE(OPTLINK) should be used for all routines called by or calling to JAVA, and it should also be used for all routines called by or calling to C (unless the C code has been compiled with a non-default linkage).

LINKAGE(SYSTEM) should be used 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.

LINKAGE(OPTLINK) 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.

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

Under BIN1ARG, the compiler will pass a FIXED BIN argument as is to an unprototyped function.

But under NOBIN1ARG, the compiler will assign any one-byte REAL FIXED BIN argument passed to an unprototyped function to a two-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 specified DEFAULT(BIN1ARG), the compiler would pass the address of a one-byte FIXED BIN(1) argument to the routine f1 and the address of a two-byte FIXED BIN(15) argument to the routine f2. However, if you specified DEFAULT(NOBIN1ARG), the compiler would pass the address of a two-byte FIXED BIN(15) argument to both routines.

Note that if the routine f1 was a COBOL routine, passing a one-byte integer argument to it would cause problems since COBOL has no support for one-byte integers. In this case, using DEFAULT(NOBIN1ARG) might be helpful; but it would be better to specify the argument attributes in the entry declare.

BIN1ARG is the default.

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

Under NULLSTRADDR, when a null string is specified as an argument in an entry invocattion, the compiler will pass the address of an initialized piece of automatic storage. The 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 invocattion, the compiler will pass a null pointer as the address of the argument. The is compatible with what early releases of the Enterprise PL/I compiler did.

NULLSTRADDR 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 want binvalue(null()) to equal 'ff_00_00_00'xn as is true with previous releases of PL/I, specify NULL370.

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

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 passed a structure from one routine to a routine that was 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 assumed.

DESCLOCATOR is the default.

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

You should 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.

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 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 may be specified without or without quotes, but if it is specified with quotes, the string should not have an X suffix.

Under NOINITFILL, the storage used by an automatic variable may hold arbitrary bit patterns unless the variable is explicitly initialized.

INITFILL can cause programs to run significantly 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 very 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.

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 for p <= 21. SHORT (IEEE) maps FLOAT BIN (p) to a short (4-byte) floating point number for p <= 24.

SHORT (HEXADEC) 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 specified DEFAULT(DUMMY(ALIGNED)), a dummy argument would be created, while if you specified DEFAULT(DUMMY(UNALIGNED)), no dummy argument would be created.

DUMMY(ALIGNED) is the default.

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 using the extension '.inc'. So, for example, under the DFT(LOWERINC) option, the statement %INCLUDE STANDARD; will cause the compiler to try to include standard.inc. But, under the DFT(UPPERINC) option, the statement %INCLUDE STANDARD; will cause the compiler to try to include STANDARD.INC.

UPPERINC 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 prior to 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.

ALIGNED | UNALIGNED
This suboption allows you to force 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.

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.

NOOVERLAP will produce code that performs better; however, if you use NOOVERLAP, you must insure that the source and target never overlap.

NOOVERLAP is the default.

HEXADEC | IEEE
This suboption allows you to specify the default representation 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.

Programs that communicate with JAVA should probably use the IEEE option, and programs that pass data to or receive data from platforms where IEEE is the default representation for floating-point data might also want to use the IEEE option.

HEXADEC 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) ) would not be valid. For instance, under DFT( E(IEEE) ), the statement "put skip edit(x) ( e(15,8));" would be flagged because the E format item is invalid.

E(HEXADEC) is the default.

Default: DEFAULT( IBM EBCDIC ASSIGNABLE BYADDR NONCONNECTED DESCRIPTOR NATIVE NATIVEADDR NOINLINE ORDER LINKAGE(OPTLINK) EVENDEC NOINITFILL UPPERINC NULL370 BIN1ARG NULLSTRADDR NONRECURSIVE DESCLOCATOR RETURNS(BYADDR) SHORT(HEXADEC) DUMMY(ALIGNED) NORETCODE ALIGNED ORDINAL(MIN) NOOVERLAP HEXADEC E(HEXADEC) )


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)