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.
>>-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-+-------------------+ | .-MIN-----. | +-ORDINAL--(--+-+-----+-+--)-----+ | '-MAX-' | | .-IEEE--------. | +-E--(--+-+---------+-+--)-------+ | '-HEXADEC-' | | .-NORETCODE-. | +-+-RETCODE---+------------------+ | .-ALIGNED---. | +-+-UNALIGNED-+------------------+ | .-PSEUDODUMMY---. | '-+-NOPSEUDODUMMY-+--------------'
ABBREVIATIONS: DFT, ASGN, NONASGN, CONN, NONCONN
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, 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.
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.
'123'A is the same as '313133'X '123'E is the same as 'F1F1F3'X
Under BIN1ARG, the compiler will pass a FIXED BIN argument as is to an unprototyped function.
But under NOBIN1ARG, the compiler will assign 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 specified DEFAULT(BIN1ARG), the compiler would pass 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 specified DEFAULT(NOBIN1ARG), the compiler would pass the address of a 1-byte FIXED BIN(15) argument to both routines.
Note that if the routine f1 was a COBOL routine, passing a 1-byte integer argument to it would cause problems since COBOL has no support for 1-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.
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.
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.
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.
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.
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.
If you specify INITFILL with a hexadecimal value (nn), that value is replicated and fills storage for all automatic variables. If you do not enter a hexadecimal 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.
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.
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.
LOWERINC is the default.
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.
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.
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.
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 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 from procedures that did not have the RETURNS attribute.
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) 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) PSEUDODUMMY).