Rational Developer for System z
PL/I for Windows, Version 7.6, Programming Guide

DEFAULT

This 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-+------------------------+-+-'
                   | .-ASCII--.                     |
                   +-+-EBCDIC-+---------------------+
                   | .-ASSIGNABLE----.              |
                   +-+-NONASSIGNABLE-+--------------+
                   | .-BYADDR--.                    |
                   +-+-BYVALUE-+--------------------+
                   | .-NONCONNECTED-.               |
                   +-+-CONNECTED----+---------------+
                   | .-DESCRIPTOR---.               |
                   +-+-NODESCRIPTOR-+---------------+
                   | .-NATIVE----.                  |
                   +-+-NONNATIVE-+------------------+
                   | .-NATIVEADDR----.              |
                   +-+-NONNATIVEADDR-+--------------+
                   | .-NOINLINE-.                   |
                   +-+-INLINE---+-------------------+
                   | .-REORDER-.                    |
                   +-+-ORDER---+--------------------+
                   |             .-OPTLINK-.        |
                   +-LINKAGE--(--+---------+--)-----+
                   |             +-SYSTEM--+        |
                   |             +-CDECL---+        |
                   |             '-STDCALL-'        |
                   | .-IEEE----.                    |
                   +-+-HEXADEC-+--------------------+
                   | .-EVENDEC---.                  |
                   +-+-NOEVENDEC-+------------------+
                   | .-INITFILL----.                |
                   +-+-(--'nn'x--)-+----------------+
                   | '-NOINITFILL--'                |
                   | .-NULLSTRADDR---.              |
                   +-+-NONULLSTRADDR-+--------------+
                   |                .-NULL----.     |
                   +-NULLSTRPTR--(--+---------+--)--+
                   |                '-SYSNULL-'     |
                   | .-NULLSYS-.                    |
                   +-+-NULL370-+--------------------+
                   | .-BIN1ARG---.                  |
                   +-+-NOBIN1ARG-+------------------+
                   | .-NONRECURSIVE-.               |
                   +-+-RECURSIVE----+---------------+
                   | .-NOOVERLAP-.                  |
                   +-+-OVERLAP---+------------------+
                   | .-DESCLIST----.                |
                   +-+-DESCLOCATOR-+----------------+
                   |             .-BYVALUE----.     |
                   +-RETURNS--(--+-+--------+-+--)--+
                   |               '-BYADDR-'       |
                   |           .-HEXADEC--.         |
                   +-SHORT--(--+-+------+-+--)------+
                   |             '-IEEE-'           |
                   |           .-ALIGNED-------.    |
                   +-DUMMY--(--+-+-----------+-+--)-+
                   |             '-UNALIGNED-'      |
                   | .-LOWERINC-.                   |
                   +-+-UPPERINC-+-------------------+
                   | .-NORETCODE-.                  |
                   +-+-RETCODE---+------------------+
                   |             .-MIN-----.        |
                   +-ORDINAL--(--+-+-----+-+--)-----+
                   |               '-MAX-'          |
                   |       .-IEEE--------.          |
                   +-E--(--+-+---------+-+--)-------+
                   |         '-HEXADEC-'            |
                   | .-NORETCODE-.                  |
                   +-+-RETCODE---+------------------+
                   | .-ALIGNED---.                  |
                   '-+-UNALIGNED-+------------------'
 

ABBREVIATIONS: DFT, ASGN, NONASGN, CONN, NONCONN

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.

ASCII or EBCDIC

Use this option to set the default for the character set used for the internal representation of character problem program data.

Specify EBCDIC only when compiling programs that depend on the EBCDIC 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 '313133'X
  '123'E is the same as 'F1F1F3'X
ASSIGNABLE or NONASSIGNABLE
This option applies only to static variables. The compiler flags statements in which NONASSIGNABLE variables are the targets of assignments. If you are porting code to the mainframe, this option flags statements that would otherwise raise a protection exception (if your program is reentrant).
BYADDR or 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.
CONNECTED or 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.
DESCRIPTOR or 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 yields errors under the following conditions:
NATIVE or NONNATIVE
This option affects only the internal representation of fixed binary, ordinal, offset, area, and varying string data. When the NONATIVE 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 non-native 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.

NATIVEADDR or 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.

INLINE or 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.

REORDER or ORDER
Affects optimization of the source code. Specifying REORDER allows optimization of your source code, seeImproving performance
ORDINAL (MAX or MIN)
If you specify ORDINAL(MAX), all ordinals whose definition does not include a PRECISION attribute are given the attribute PREC(31). Otherwise, they are given the smallest precision that covers their range of values.
OVERLAP or 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. Improving performance.
LINKAGE
The linkage convention for procedure invocations is:
OPTLINK
The default linkage convention for PL/I for Windows. This linkage provides the best performance.
SYSTEM
All parameters are passed on the stack, but the calling function cleans up the stack.
STDCALL
The standard linking convention for Windows APIs. This linkage convention is used under Windows and passes all parameters on the stack. The called function cleans up the stack.
CDECL
All parameters are passed on the stack, but the calling function cleans up the stack. External names have _ applied as a prefix.

OPTIONS(COBOL) implies LINKAGE(SYSTEM) unless a linkage is specified on the entry DCL or PROC statement.

For more detailed information on linkage conventions, see Calling conventions.

IEEE or HEXADEC

IEEE specifies that floating-point data is held in storage using native IEEE format. HEXADEC indicates that storage of floating-point data is identical to the mainframe environment.

EVENDEC or 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 (just as it would not be raised of you were using mainframe PL/I).

EVENDEC is the default.

BIN1ARG or 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.

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

If you specify INITFILL with a hex value (nn), that value is replicated and fills storage for all automatic variables. If you do not enter a hex value, the default is '00'x. NOINITFILL does no initialization of these variables. INITIFILL can cause programs to run significantly slower and should not be specified in production programs. During program development, however, it is useful for detecting uninitialized automatic variables.

NOINITIFILL is the default.

LOWERINC or UPPERINC
If you specify LOWERINC, the compiler accepts lowercase filenames for INCLUDE files. If you specify UPPERINC, the compiler accepts uppercase filenames for INCLUDE files.

LOWERINC is the default.

NULLSTRADDR or 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.

NULLSTRPTR
This suboption controls how the compiler handles null strings when 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

NULLSTRPTR(NULL) is the default.

NULLSYS or 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 mainframe PL/I, specify NULL370.

NULLSYS is the default.

RECURSIVE or 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 or DESCLOCATOR
When you specify DEFAULT(DESCLIST), the compiler generates code in the same way as previous workstation product releases (all descriptors are passed 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 mainframe 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.

DESCLIST is the default.

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

RETURNS(BYVALUE) is the default. 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.

SHORT (HEXADEC or IEEE)
This suboption improves compatibility with other unix PL/I compilers. SHORT (HEXADEC) indicates that FLOAT BIN (p) is to be mapped to a short (4-byte) floating point number for p <= 21. SHORT (IEEE) indicates that FLOAT BIN (p) is to be mapped to a short (4-byte) floating point number for p <= 24.

SHORT (HEXADEC) is the default.

DUMMY (ALIGNED or 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.

RETCODE or NORETCODE
If you specify RETCODE, any external procedure that does not have the RETURNS attribute returns an integer value obtained by invoking the PLIRETV built-in function just prior to returning from that procedure. This makes such procedures behave like similar procedures invoked from COBOL on the mainframe.

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

ALIGNED or 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.

E( IEEE or HEXADEC )
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.

DFT( E(HEXADEC) ) is useful in developing and testing 390 applications on the workstation. The statement "put skip edit(x) ( e(15,8));" would produce no messages on 390, but, by default, it would be flagged under Intel and AIX. Specifying DFT(E(HEXADEC)) would fix this.

IEEE is the default.

DEFAULT (IBM ASCII ASSIGNABLE BYADDR NONCONNECTED DESCRIPTOR NATIVE NATIVEADDR NOINLINE REORDER LINKAGE(OPTLINK) IEEE EVENDEC BIN1ARG NOINITFILL ORDINAL(MIN) NOOVERLAP NULLSTRADDR NULLSTRPTR(NULL) NULLSYS NONRECURSIVE DESCLIST RETURNS(BYVALUE) SHORT(HEXADEC) DUMMY(ALIGNED) LOWERINC NORETCODE ALIGNED E(IEEE)).


Terms of use | Feedback

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