Generates a file containing the data structures processed by the PL/I compiler. If adt-filename is not specified, a file with the name program-name.adt is generated. This file is consumed by the Record/Segment Layout Editor, which creates Segment Layout Files (SLF) and Record Layout Files (STR) using these PL/I structure descriptions. Data File Tools can then use these layout files to aid in processing/editing the segments or records (Data File Convert, Data File Editor, IMS Database Editor, IMS Database loader).
Use the ADT file with the Layout Editor to create SLF and STR files.
Example:dcl myarr(4) fixed bin(31) static init (1); put skip list (myarr); results in: 1 1 1 1
By default, without -agginit, only the first element is initialized.
- Evaluation of variables is not supported.
- -coffdebug is not supported on bit Windows.
Warning: This option is required for the mfdb2 preprocessor, which is deprecated. Please use the EXEC preprocessor (invoked by -sql db2)
The -defext option causes the initialized values of STATIC EXTERNAL variables and external file constants to be defined. Each STATIC EXTERNAL variable that has an INITIAL value must be declared in one and only one module that has been compiled with -defext. Failure to do so causes the INITIAL value to have no effect. The default is -nodefext.
Also, each file constant must be declared in one and only one module that has been compiled with -defext. When -defext is used, file attributes specified in the file declaration merges with attributes specified when the file opens. This is critical when doing VSAM/INDEXED I/O.
Note: The WIDECHAR and GRAPHIC data types are not supported with the -ebcdic compiler option.
- Sets the maximum Fixed Binary precision to This is the Open PL/I default.
- Sets the maximum Fixed Binary precision to 63 and enables Fixed Binary (63) support.
You can also use -fixed_bin_max_p as a synonym to -fbmaxp.
- The z/OS default.
- Open PL/I default for Enterprise Developer release and earlier.
- Open PL/I default for Enterprise Developer release and later.
Fixed decimal precision 31 is the maximum allowed.
You can also use -fixed_dec_max_p as a synonym to -fdmaxp.
- Emits diagnostic messages beginning at the Informational level (Lists all messages. This is the default).
- Emits diagnostic messages beginning at the Warning level.
- Emits diagnostic messages beginning at the Error level.
- Emits diagnostic messages beginning at the Severe level.
Note: EBCDIC data and constants in conjunction with -graphic is not supported .
The -ipath option instructs the Compiler to use these directories in the specified order in its search for files to satisfy %INCLUDE statements (except in cases where an absolute directory path is specified in the %INCLUDE statement).
For example, suppose the source program contains:%INCLUDE partlist;
and the Compiler invocation command is:mfplx -ipath .:/u/libr1:/u/libr2
In this case, the Compiler will first search for "PARTLIST" in the current working directory, then /u/ libr1, and finally /u/ libr2. If that fails, it will search for "partlist" (lowercase) in the same directories.
In a Windows environment, the equivalent Compiler invocation is:mfplx -ipath .;drive:\libr1;drive:\libr2
For example, suppose the source program contains:%INCLUDE partlist;
and the Compiler invocation command is:mfplx -isuffix .INC
In this case, the Compiler searches for a file named partlist.inc.
- When used without a colon or any arguments, -map produces a storage allocation map at the end of the listing file.
- When used with a colon and an argument, for example -map: (where is the filename of a linker map file), this option passes to ldpli and to generate a linker map for the specified filename.
-map add -map: can be used together.
Note: There must be no spaces around the comma separating the left and right margin.
where is one of I, W, E, S as follows:
- Counts all compiler messages starting at I-level (Informational) against the maximum.
- Counts all compiler messages starting at W-level (Warning) against the maximum.
- Counts all compiler messages starting at E-level (Error) against the maximum.
- Counts only S-level (Severe) against the maximum.
The maximum number.
The default is .
Compilation terminates if the number of messages exceeds the maximum number allowed. If messages are below the specified severity, they are not counted in the number. The value of can range from 0 to If you specify 0, the compilation terminates when the first error of the specified severity is encountered.
An unrecoverable A-level (Abort) error message always results in termination.
Example:-names 'string1' [ 'string2' ]
- Extralingual characters to add to identifier.
Corresponding upper case characters. Optional.
The default is:-names '[email protected]#' '[email protected]#'
For additional characters you must specify the default or subset if desired, plus the additional lingual characters.-names '[email protected]#Ј'
For convenience, hex constants of the form are accepted in place of the strings above.-names 0xa3
The -nodefext option prevents definition of initialized values of STATIC EXTERNAL variables and external file constants (default). See the -defext compiler option for more information.
Also, each file constant must be declared in one and only one module that has been compiled with -defext. When -defext is used, file attributes specified in the file declaration will be merged with attributes specified when the file is opened. This is critical when doing VSAM/INDEXED I/O.
Note: Any of the options -cics, -sql, -dli, -mvs, and/or –ims imply –nolaxbased. This can be overridden when used in combination with –laxbased.
Example:DCL S1 CHAR(10); DECLARE S2 CHAR(20) DEFINED (S1);
will result in an appropriate diagnostic.
Note: Any of the options -cics, -sql, -dli, -mvs, and/or –ims imply –nolaxdefined. This can be overridden when used in combination with –laxdefined.
Example:DCL X FIXED BIN (15); DECLARE Y FIXED BIN (31) BASED (ADDR(X));
will result in an appropriate diagnostic.
If -c is specified, the -o option is passed to the compiler; if -c is not specified, -o is passed to ldpli.
- Tells the EXEC preprocessor to inject an automatic call to start the GUI CodeWatch debugger.
Using the -optexec option with the PLITEST parameter also lets you debug PL/I programs that run under CICS. During execution, the program stops at the first executable statement (either the PROCEDURE statement or the first statement following the PROCEDURE statement, depending on the execution environment). Specify the appropriate program source files and debug files with the and environment variables when using PLITEST with this option.
- Specifies a name for the outermost external procedure in addition to other names that may have been specified on the PROCEDURE statement. Use this when the name on the procedure does not match the name of the executable. (newname) is the same name as the name of the executable.
- Causes the preprocessor to create a file source.trc where is the name of your source file.
- Creates a trace file for submission to Technical Support if requested.
- Creates a log file from the internal functions called by the program.
- Creates a dynamic visual trace of the program.
Where is the username and is the password for the remote DB2 connection. mfplx first checks the -pass for a username/password and uses these values if specified. If not specified, it uses the values set for the and environment variables.
Specifies IMS linkage when calling a PLITDLI entry point name rather than a user supplied PLITDLI. This option allows for declared as such in the user program (without an entry descriptor list and/or return type).
Example:declare myproc external entry( fixed binary(31), fixed binary(15), fixed binary(15)); myproc: procedure(a,b,c); /* mismatch diagnosed, -proto and -vax */ declare a fixed binary(15); declare b fixed binary(15); declare c fixed binary(15); end t;
Exceeding array or string bounds at run time, raise either the SUBSCRIPTRANGE or STRINGRANGE conditions as appropriate. Use this option to debug programming errors relating to subscripts and substrings. Use the -norange option for debugged code. The default is -norange.
|Compilation Error Code Leve||Return Code||Description|
|0||0||No diagnostic messages or I-level ( Informational) only.|
|0||4||W-level (Warning) diagnostic messages (object code generated)|
|1||8||E-level (Error) diagnostic messages (object code generated but execution behavior is not defined – the source code is in error and should be corrected)|
|1||12||S-level (Severe) ) diagnostic messages (object code not generated)|
- Specifies an ODBC-compliant database.
- Specifies an IBM, DB2, or UDB database.
- Specifies an oracle "Call" interface database.
Note: You may need to set the and variables to the appropriate locations when using this option.
Specifies that this OPTIONS(MAIN) program will execute under the control of CICS. Such a program may have 0, 1, or 2 parameters, all of which must be POINTER. Such a program, almost always, will specify -cics and may also specify one or more of –sql and –dli.
- Enables Float Binary(24) as equivalent to Float Binary(23).
- Enables Float Binary(53) as equivalent to Float Binary(52).
- Causes the BINARY attribute to be assumed if the FIXED attribute is specified without BINARY or DECIMAL.
- Either a positive four-digit integer such as that represents the start of a fixed window or a negative integer that specifies a “sliding” window. For example, -window indicates a window that starts 50 years prior to the year when the program runs.
Use with -xref to include all identifiers and attributes in the listing. Use with -xref to exclude unreferenced identifiers.
- Affects mapping of structure members. z/OS structure mapping rules use a "shift-to-align" algorithm to minimize compiler inserted pad bytes for the alignment requirement of structure members. This differs from the default Open PL/I structure mapping rules described in the Structure topic, which are compatible with other UNIX and Windows compilers for inter-language compatibility.
- Sets the default FLOAT BINARY single precision to 21 and the default FLOAT BINARY double precision to 53 ( implies -zfloat). The Open PL/I default is 23 and 52 respectively.
- Specifies that the default alignment attribute for the CHAR, CHAR VAR, GRAPHIC, GRAPHIC VAR, WIDECHAR, WIDECHAR VAR and PICTURE data types is unaligned (implies -zchar). The Open PL/I default is aligned.
- Implies double-word alignment of double precision FLOAT BINARY on Intel bit systems (the Open PL/I and Intel native default alignment is word on Intel bit systems)
- Implies double-word alignment of AREA on Intel bit systems (the Open PL/I default alignment is word on Intel bit systems)
Structure Layout Example (Open PL/I default)
The following shows structure ST with size 8 bytes; member "C" is at offset 0 (byte alignment) and member "X" is at offset 4 (word alignment), with 3 compiler-inserted pad bytes between.1 2 dcl 1 ST, 3 2 C CHAR, 4 2 X FIXED BIN(31); 5 NAME CLASS SIZE LOCATION ATTRIBUTES ST BASED 8 LEVEL 1 STRUCTURE C MEMBER 1 LEVEL 2 CHAR(1) 3 -pad- X MEMBER 4 LEVEL 2 FIXED BIN(31,0)
Structure Layout Example (-zalign)
The following shows structure ST with size 5 (8 bytes are allocated in memory); member "C" is at offset 0 (byte alignment) and member "X" is at offset 1 (word alignment). In this example each member is shifted by 3 bytes (OFFSET=3 as shown below) to properly align each member on its required boundary, thus minimizing (and in this case eliminating) compiler-inserted bytes. Effectively, the "shift-to-align" algorithm propagates pad bytes that fill natural alignment gaps between members toward the beginning of the structure. Pad bytes which have been shifted outside the structure (that is, preceding the first member) are known as "hang bytes".1 2 dcl 1 ST, 3 2 C CHAR, 4 2 X FIXED BIN(31); 5 NAME CLASS SIZE LOCATION ATTRIBUTES ST BASED 5 LEVEL 1 STRUCTURE OFFSET=3 C MEMBER 1 LEVEL 2 CHAR(1) UNALIGNED X MEMBER 4 LEVEL 2 FIXED BIN(31,0)
- The use of this option is recommended only when structure mapping is required to match z/OS structure mapping rules. An example when required might be reading files imported from the mainframe containing record structures that have z/OS compiler-inserted (and possibly removed) pad bytes for alignment purposes.
- If -zalign is used for the compilation of one module, it is recommended that all modules in a given program be compiled as such for compatibility. Mixing --zalign with compilation units in the same program may work, but this can be problematic if the modules compiled with -zalign are not "self-contained".
- For adjustable structures (having REFER-extents or non-constant sized members), the -zalign "shift-to-align" algorithm will cause more code to be generated to access structure members with non-constant offsets (seen in the -map listing as (-V-) under the Location Field). Depending upon structure layout, the amount of code generated can be extensive as compared against the Open PL/I default mapping rules (when not using -zalign). Compiler optimization at a minimum level of -opt 2 is recommended.
- For structures with multiple REFER-extents, compiler resources may be impacted resulting in a Compiler Abort. Please contact Micro Focus SupportLine.
The CICS Web Services feature is EAP for development and testing usage. It should not be used for production deployment in this product release
Note: This affects storage requirements for CHAR VAR , GRAPHIC VAR, and WIDECHAR VAR. It also affects parameter and descriptor matching at CALL statements.
Example (Open PL/I default):Dcl c char; Dcl sub entry (char unaligned); Call sub(c); /* A dummy argument is created for “c” */ Dcl c char; Dcl sub entry (char aligned); Call sub(c); /* “c” is passed by reference */ Example (-zchar) Dcl c char; Dcl sub entry (char unaligned); Call sub(c); /* “c” is passed by reference */ Dcl c char; Dcl sub entry (char aligned); Call sub(c); /* A dummy argument is created for “c” */
Note: Floating point precisions that are less than or equal to 21 are implemented as IEEE single precision floating point. Floating point precisions that are greater than 21 are implemented as IEEE double precision floating point.
Compiling with -zp1 effectively packs all structures so that any pad bytes used for data alignment are eliminated. This is useful when files originating from the mainframe have records in which the data items are packed or unaligned.
When -zp1 is set, the compiler needs to take certain precautions, especially on RISC architectures where misaligned data can cause a hardware exception.
The -zp1 compiler options affects the following:
- All structure members are packed without any pad bytes for alignment as if the UNALIGNED attribute were specified at the level 1 structure level.
- All based variables are treated as if unaligned.
- All parameters are treated as if unaligned.
- All Character Varying data items are treated as if unaligned. The Open-PL/I default alignment for CHAR VAR is HALFWORD which is the natural alignment of the leading fixed bin (15) length.
When using -zp1, to maintain consistency in passing arguments without modifying the source code, the compiler disables creating dummy arguments at call points when the argument is a structure member and the argument and parameter descriptors do not explicitly differ between the UNALIGNED and ALIGNED attributes.
Note: Using -zp1 can have an overall impact on performance. On RISC architectures such as SPARC and RS, the compiler must generate sequences of byte addressable instructions to access unaligned data items in the memory. On Intel, no changes are required for code generation, but additional clock cycles are required for the hardware to access misaligned data items.
The behavior of the –zp1 option has been reverted to that of versions of Enterprise Developer earlier than Update 1, with an additional correction relating to Char Varying data items.
The behavior has been restored to that in Enterprise Developer versions earlier than where, when compiling with –zp1, all parameters are treated as unaligned. (In Enterprise Developer Update 1, the behavior when compiling with –zp1 was to not treat parameters as if unaligned).
When using the –zp1 compiler option, all Character Varying data items are now treated as if unaligned. In previous versions of Open PL/I, for Character Varying data items, the –zp1 unaligned requirement was applied only to structure members and parameters.
To illustrate the change, consider the following example:zptest: proc options(main); dcl 1 st1, 2 c char, 2 x(4) char(7) var init ('a', 'xx', 'yyy', 'zzzz'); dcl y(4) char(7) var init ('a', 'xx', 'yyy', 'zzzz'); dcl sub entry ((4) char(7) var); call sub (x); call sub (y); end; sub: proc (z); dcl z(4) char(7) var; dcl i fixed bin(31); do i = 1 to hbound(z); z(i) = 'x'; end; end;
- For and , each item is 7 plus 2 bytes which equals 9 and then multiplied by 4 equals
- If were aligned on half-word by default, each array element is half-word aligned and each equals 10 bytes (9 + 1 pad byte), and the total size equals 40 bytes.
- At , the calling argument and parameter are matched.
- At the , the element size (10 bytes) is mismatched against the parameter element size (9 bytes) due to –zp1. This is incorrect and causes unexpected program behavior.
Due to this correction of treating all Char Varying data items as if unaligned when using –zp1, the size of CHAR VARYING arrays now differs from previous versions of Open-PL/I. For example:dcl X(4) char(7) var; Put skip list (size(X)) /* size is 36 bytes vs. 40 bytes in previous versions of Open-PL1 */
Important COBOL compiler options
Important Cobol Compiler Options SSRANGE, APOST, RENT, OFFSET, LIST
COBOL programs which are coded are called Source module that are not executable. Source code goes thru a process called Compilation that produces object module or Load Module which is an executable code format. These Load modules are stored in a Load Library and are made available to RUN JCL using STEPLIB/JOBLIB during the execution of the JOB.
IGYCRCTL is the IBM provided COBOL Compiler Utility. This will create the Object module which is the input to Link editor-IEWL and it Link edits this object module and creates a Load Module.
Different compiler options can be provided to IGYCRCTL using the PARM. Below are the list of important COBOL Compiler options
SSRANGE and NOSSRANGE
SSRANGE As name implies, its functionality is to check the boundaries. This Compiler Option if used generates an extra code to validate the boundaries of the Subscripts, Indexes, Reference Modifications and makes sure that these are not being addressed outside the size defined. It also takes care of Occurs Depending On values by restricting them not going beyond its limit.
While executing the program this compiler option checks the boundary conditions and throws an abend.
NOSSRANGE is the default one.
Ex: If a Program is trying to access 6th element of a Array which is defined with 5 occurrences only. With SSRANGE compiler option, program abends. With NOSSRANGE, program does not abend but it may fetch garbage.
RENT and NORENT
These Compiler options tells whether a Program compiled is of RENTrant or Not. RENT makes the program as Re-entrant where as NORENT makes the program as non re-entrant programs.
Re-entrant programs are the ones that does not modify itself when it is reentered after an interruption by the OS. It is possible because it maintains a separate copy of working storage for each Task. Must use RENT for programs that run under CICS or UNIX. In contrary to a Re-entrant programs, in Pseudo conventional program, a task gets ended without waiting for the user input and after the input is received, it gets started (reentered) from that point only.
Default>LIST = No
LIST=Yes produces the listing of source code in Assembler language. In case of abends, this listing is very useful in finding the abend location.
Default > NOOFFSET
OFFSET produces the list of relative addresses of Object code which contains Line Number, Location in HEX and Verb.
LINE # HEXLOC VERB LINE # HEXLOC VERB LINE # HEXLOC VERB
A DISPLAY PERFORM A OPEN
DISPLAY E PERFORM CLOSE
LIST and OFFSET are mutually Exclusive.
It directs the compiler on which source code line numbers to be used in error conditions. Whether to use line numbers from the generated LISTing or from the Source code.
NUM=No > Uses line number from the compiler generated listing.
=Yes > Uses line numbers from the source code. If there are any copy members in the source code, make sure its line numbers differs from source code line numbers.
Default > SIZE(MAX)
It indicates the amount of storage required for compilation.
Syntax: SIZE(MAX) OR SIZE(nnnnn) or SIZE(nnnK)
MAX> allocates MAX possible main storage for the compile process
If the compilation is in bit then it allocates all the storage above 16MB line in Used region.
nnnnn> is a decimal number which should be greater than or equal to
nnnK > is also a decimal representation but in increments of 1-KB. Minimum value is K
Default > NOTEST
It enables the debugging facility. With TEST compiler options the programs can be debugged also it has few sub options which enables the JUMPTO and GOTO debugger options.
Default > QUOTE
This compiler options indicates whether to use Double Quotation marks() or Single Quotation Marks() as a delimiter for non numeric literals.
Quote> Directs to use Double quotes as the delimiter
APOST> Directs to use Single quotes as the delimiter
This is to indicate what language to be used for the Output Compiler listing messages.
EN> Mixed case US English
UE> Upper case US English
Used for COBOL-DB2 programs so that the DB2 co processor gets enabled.
SQL=YES > use YES if there are any SQL statements in the program.
VS COBOL II Support
To call a program dynamically you must use the call identifier format.
A VS COBOL II program can use the COBOL CALL verb to invoke an assembler or COBOL II subprogram. The CA IDMS TRANSFER CONTROL (LINK or XCTL) must be used for invoking VS COBOL subprograms. The subprogram must be defined to the system either at SYSGEN or by using a DCMT VARY DYNAMIC PROGRAM command. The correct language must be specified, and the NONOVERLAYABLE attribute must also be specified.
A COBOL II program and all the COBOL II subprograms that it calls dynamically must be compiled with the same RES/NORES compiler option.
A dynamic call is often a more efficient way for one online VS COBOL II program to call another than the use of a TRANSFER CONTROL DML command. Note, however, that when a dynamic call is made, the DC/UCF system is not aware that the application is running in a new program. Therefore, error messages and program statistics will not reflect the call.
There are also restrictions on using static or dynamic calls when invoking an assembler subprogram. If the assembler program is not fully reentrant or if the assembler program issues any operating system SVC instructions, the program must be invoked with a DC TRANSFER control statement. Note that use of SVC instructions in an online program presents security and performance concerns. Such instructions should be avoided unless they are absolutely necessary. In most cases, DC/UCF system functions can be used instead.
Note: Also see "Performance Improvements with RHDCLEFE" in Appendix I:.
Adds one byte to the record length for the printer control character. This option might be useful to programmers who use WRITE. . .ADVANCING in their source files. The first character of the record does not have to be explicitly reserved by the programmer.
Does not adjust the record length for WRITE. . .ADVANCING. The compiler uses the first character of the specified record area to place the printer control character. The application programmer must ensure that the record description allows for this additional byte.
1. With ADV=YES, the record length on the physical device is one byte larger than the record description length in the source program.
2. If the record length for the output file is not defined in the source code, COBOL ensures that the DCB parameters are appropriately set.
3. If ADV=YES is specified, and the record length for the output file has been defined in the source code, the programmer must specify the record description length as one byte larger than the source program record description. The programmer must also specify the block size in correct multiples of the larger record size.
4. If the LINAGE clause is specified in a file description (FD), the compiler treats that file as if ADV=YES has been specified.
Specifies 18 digits as the maximum precision for decimal data.
Specifies 31 digits as the maximum precision for decimal data.
When the NO option is specified, any CICS statements that are found in the source program are diagnosed and discarded.
If a COBOL source program contains CICS statements and has not been preprocessed by the CICS translator, the YES option must be specified.
The CICS compiler option can contain CICS suboptions. The CICS suboptions delimiter can be quotes or apostrophes. CICS suboptions cannot be specified as a COBOL installation default.
You can specify the CICS compiler option in any of the compiler option sources: installation defaults, compiler invocation, or PROCESS or CBL statements.
Indicates that you want full compilation, including diagnostics and object code.
Indicates that you want only a syntax check.
Specifies an error message level: W is warning; E is error; S is severe. When an error of the level specified or of a more severe level occurs, compilation stops, and only syntax checking is done for the balance of the compilation.
Note: Specifying NOCOMPILE might affect the Associated Data file by stopping compilation prematurely, resulting in loss of specific messages.
Places the generated object code in a file defined by SYSPUNCH.
Sends no object code to SYSPUNCH.
Causes the compiler to issue a severity-4 (warning) diagnostic message for MOVE statements with numeric receivers when the receiving data item has fewer integer positions than the sending data item or literal.
Does not cause the compiler to produce a severity-4 message.
The diagnostic is also issued for moves to numeric receivers from alphanumeric data names or literal senders, except when the sending field is reference modified. There is no diagnostic for COMP-5 receivers, nor for binary receivers when you specify the TRUNC(BIN) option.
Dynamically loads subprograms that are invoked through the CALL literal statement.
Performance consideration: Using DYNAM=YES eases subprogram maintenance because the application is not relink-edited if the subprogram is changed. However, individual applications with CALL literal statements can experience some performance degradation due to a longer path length.
Includes, in the calling program, the text files of subprograms called with a CALL literal statement into a single module file.
The DYNAM option has no effect on the CALL identifier statement at compile time. The CALL identifier statement always compiles to a dynamic call.
Do not specify DYNAM=YES for applications running under CICS.
Note: The second severity level used in this syntax must be equal to or higher than the first.
Specifies that errors at or above the severity level specified are flagged and written at the end of the source listing.
ID Type Return Code
I Information 0
W Warning 4
E Error 8
S Severe error 12
U Unrecoverable error 16
The optional second severity level specifies the level of syntax messages embedded in the source listing in addition to being at the end of the listing.
Indicates that no error messages are flagged.
If the messages are to be embedded, SOURCE must be specified at compile time. Embedded messages enhance productivity because they are placed after the referenced source statement.
Specification of FLAG(W|E|S) might result in the loss of entire classes of messages from the Events records in the Associated Date file. See Enterprise COBOL for z/OS Programming Guide for more information.
Indicates that the source program contains COPY or BASIS statements.
Indicates that the source program doesnt contain COPY or BASIS statements.
Produces a listing that includes:
The assembler-language expansion of source code
Information about working storage
Suppresses this listing.
Note: The LIST and OFFSET compiler options are mutually exclusive. Setting OFFSET=YES and LIST=YES results in a nonzero return code and an error message during assembly of the customization macro.
Uses the line numbers from the source program rather than compiler-generated line numbers for error messages and procedure maps.
Uses the compiler-generated line numbers for error messages and procedure maps.
If COBOL programmers use COPY statements and NUM=YES is in effect, they must ensure that the source program line numbers and the COPY member line numbers are coordinated.
Indicates that you want a listing of the source statements in the compiler-generated output. This listing also includes any statements embedded by COPY.
Source statements do not appear in the output.
Note: The SOURCE compiler option must be in effect at compile time if you want embedded messages in the source listing.
Specify to have any SQL statements found in the source program diagnosed and discarded.
Use SQL=NO if your COBOL source programs do not contain SQL statements, or if the separate SQL preprocessor will be used to process SQL statements before invocation of the COBOL compiler.
Use to enable the DB2 coprocessor capability and to specify DB2 suboptions. You must specify the SQL option if your COBOL source program contains SQL statements and it has not been processed by the DB2 precompiler.
1. You can specify the SQL option in any of the compiler option sources: compiler invocation, PROCESS/CBL statements, or installation defaults.
2. Use either quotes or apostrophes to delimit the string of DB2 suboptions.
3. DB2 suboptions cannot be specified as part of customizing the SQL option. (DB2 suboptions are supported only when the SQL compiler option is specified as an invocation option or on a CBLor PROCESS card.) However, default DB2 options can be specified when you customize the DB2 product installation defaults.
4. The SQL=YES option conflicts with the LIB=NO option.
Generates code that checks subscripts, reference modifications, variable-length group ranges, and indexes in the source program at run time to ensure that they do not refer to storage outside the area assigned. It also verifies that a table with ALL subscripting, specified as a function argument, contains at least one occurrence in the table.
The generated code also checks that a variable-length item does not exceed its defined maximum length as a result of incorrect setting of the OCCURS DEPENDING ON object.
Performance consideration: If SSRANGE=YES at compile time, object code size is increased and there will be an increase in runtime overhead to accomplish the range checking.
No code is generated to perform subscript or index checking at run time.
If the SSRANGE option is in effect at compile time, the range-checking code is generated.
Range-checking can be inhibited at run time by specifying the Language Environment runtime option CHECK(OFF). However, the range-checking code still requires overhead and is dormant within the object code.
The range-checking code can be used optionally to aid in resolving any unexpected errors without recompilation.
Produces a cross-reference of all verb types in a source program to the line numbers where they are found. VBREF=YES also produces a summary of how many times each verb was used in the program.
Does not produce a cross-reference or verb-summary listing.
For More Options, Look into
If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog
You may also like to look at:
Options cobol compile
Compiling COBOL and PL/I Programs and Assembling Maps
You can use the Development System Compilation Menu to compile COBOL and PL/I programs and to assemble BMS maps.
This chapter contains the following topics:
Compilation Menu Functions
On the Development System Compilation Menu, you can select files to edit or compile or set Copylib directories. FIGURE shows the functions available from the Compilation Menu.
Displaying the Compilation Menu
The Compilation menu shown in FIGURE is similar to the standard file selection screen in Sun MTP.
To Display the Compilation Menu
Press PF4 on the Development System main menu.
The two display criteria fields at the top of the screen are:
Complete path name of the directory containing the programs to be compiled. The first element can be an environment variable.
Specify up to eight file extensions. The extensions indicate the file type:
: Adheres to IBM OS/VS COBOL compiler standards; assumed to be CICS programs.
: Adheres to IBM COBOL2 compiler standards; assumed to be CICS programs.
: Batch programs.
: BMS maps. This file is assembled.
: Adheres to Liant Open PL/I standards.
: Adheres to Liant Open PL/I standards.
: Adheres to Liant Open PL/I standards; assumed to contain statements.
: Adheres to Liant Open PL/I standards; assumed to be database programs.
Descriptions of the file information fields are located in TABLE
To Select Files
1. Move the cursor to the selection field to the left of the file name and type an uppercase or lowercase beside the file name.
2. Press the function key for the action you want to perform.
The following table describes the function keys on the Compilation Menu.
Executes the shell script, which opens the selected file, by default, in the editor. If you select multiple files, the last file selected is edited first and the first file selected is edited last. The script is invoked automatically for each file.
Closes the Compilation Menu and returns to the Development System main menu.
Refreshes the data in the file list portion of the screen. After you modify a file's attributes, press PF4 to update the screen.
Displays the Copylib Settings screen. See COBOL Copylib Settings.
Displays an options screen, depending on the file selected:
, or files: Displays the Set Compiler Options screen for COBOL. See Compiling COBOL Programs.
, , or files: Displays the Set Compiler Options screen for PL/I. See Compiling Online PL/I Programs.
files: Displays the Set Assembler Options Screen. See Assembling BMS Maps.
Displays the previous page of files. If the top of the file list is displayed, this message is displayed:
Beginning of data reached
Displays the next page of files. If the bottom of the file list is displayed, this message is displayed:
End of data reached
Redisplays the contents of the directory, sorted by file name.
Redisplays the contents of the directory, sorted in descending sequence by the file modification date.
Redisplays the contents of the directory, sorted in descending sequence by the file size.
No action takes place unless a file is selected. If a file is selected, either the Compiler or the Assembler screen is displayed, depending on the file extension.
If a directory is selected, the directory changes to the selected directory and the files in that directory are displayed.
COBOL Copylib Settings
The Copylib Settings screen enables you to set a maximum of eight directories that are searched for copybooks referenced in the COBOL source code. Directories are searched in the following order:
1. Current directory
2. Directories defined on the Copylib Settings screen
3. Directories defined by the environment variable
Refer to the COBOL documentation for information about the environment variable.
To Display the Copylib Settings Screen
Press PF5 on the Compilation menu.
The screen (FIGURE ) contains eight fields to enter directories that contain the copybooks. The first element in the directory name can be an environment variable, designated with a dollar sign ($). The environment variable can be followed by other subdirectories separated by slashes (/).
[ D ]
The Copylib settings, as well as other user-specific options, are maintained in the file /user-name, where user-name is the user's login name. The options are saved from session to session.
Compiling COBOL Programs
You can set COBOL compiler options and compile your programs either from the Compilation Menu or from the command line.
To compile batch programs using the command line interface, see Chapter
Using the Compilation Menu
The Set Compiler Options screen for COBOL enables you to customize the actions of the compiler.
To Display the Set Compiler Options Screen
1. Select a COBOL program file on the Compilation menu (FIGURE ).
2. Press PF6 to display the Set Compiler Options screen.
[ D ]
COBOL Compiler Options
Modify the screen values if you need to.
Name of the currently selected file displays as the default. You can change the file name. A file name can be up to 14 characters.
Defaults to the directory name on the Compilation menu screen. You can change this value. The first element in this field can be an environment variable, which can be followed by other subdirectories separated by slashes.
Some compiler options and directives are set automatically based on the extension of the selected file. You set others by modifying the default values on the screen.
The following options and directives for online programs are set based on the file extension:
The following options and directives for batch programs are set based on the file extension:
Sets the verbose option, which displays information about the compile.
Allocates data in sizes that are compatible with the mainframe.
The compiler treats statements similar to those used by mainframes.
Controls how storage is initialized. This storage is declared in a COBOL program and does not have a value statement associated with it. For online programs, this directive is set to zero to ensure that storage is set to low values. For batch programs, this option is set to 32 to ensure that storage is set to spaces.
For OS/VS COBOL programs, allows the use of BLL cells.
Note - Do not try to compile translated online programs with extensions.
The options and directives on the Set Compiler Options screen for COBOL are listed in the following table with the corresponding COBOL directive. Refer to your COBOL documentation for more information about using COBOL directives.
(intermediate code) / (native code)
The options and directives you set on the Set Compiler Options screen, as well as other user-specific directives, are saved in a file called user-name, where user-name is the user's login name. These directives are saved from session to session.
You can set other directives in the file. You can also change the default COBOL directives by modifying the shell script.
To Compile the Program
Press PF4 on the Set Compiler Options screen to execute the shell script, which calls the COBOL compiler.
If or programs are selected, they are translated and compiled. If programs are selected, they are compiled, but not translated. If multiple files were selected, the files are compiled in reverse order; the last file selected is compiled first.
When compiling is complete, the editor displays the results of the compile and translation in the default editor ().
Using the Command-Line Interface
Before you can compile an online program using the command-line interface, you must process it using the translator. After the program is translated successfully, you can compile it. When compiling programs, you usually use a set of directives on a regular basis. These directives vary according to the type of COBOL (OS/VS, COBOL2) programs being compiled. Some of these directives are required by Sun MTP to ensure that the programs compile properly. Refer to your COBOL documentation for a description of the compiler options and directives.
is the Sun MTP Common Language Translator. It locates and includes all copy files before translating CICS COBOL statements to COBOL statements. Therefore, you must set the environment variable before running . points to the location of your COBOL copybooks, mapset copybooks (if any), and to the Sun MTP copybook directory. For example:
To translate an OS/VS COBOL program named and produce an output file named , type the following command:
If errors occur during translation, you must correct the program and translate it again.
Refer to the Sun Mainframe Transaction Processing Software Reference Guide for a description of and its options.
Use the following directives to compile online COBOL2 programs. Refer to the COBOL documentation for other compiler options you might require.
Use the following directives to compile online OS/VS COBOL programs. Refer to the COBOL documentation for other compiler options you might require.
Using Scripts and Makefiles to Compile
You can type directives on the command line or you can specify the name of a file containing a list of directives.
Example: The following command to compile a COBOL2 program contains all its directives and four options () on the command line.
Example: The following command to compile an OS/VS COBOL program contains its directives in a file named , and four options () on the command line.
You can also create shell scripts to compile a single program or all the programs in one directory.
The following example illustrates a script for compiling one program. The environment variable must be set to the appropriate directives file.
|for source do echo $source cob -iaPV $source if [ $? -ne 0 ] then echo "Error in compilation of: " $source exit fi done|
CODE EXAMPLE illustrates a script that translates and compiles all online programs in a directory. The script also captures log files indicating an error or successful completion. Programs are compiled only after successful translation.
|for i in `ls *.cl2` do echo about to kixclt `basename $i .cl2`.cl2 echo about to kixclt `basename $i .cl2`.cl2 >> COMPALL.err echo about to kixclt `basename $i .cl2`.cl2 >> COMPALL.log kixclt options `basename $i .cl2`.cl2 ReturnCode=$? if [ $ReturnCode -ne 0 ] then echo "Error detected during kixclt of `basename $i .cl2`" >> COMPALL.err else echo about to compile `basename $i .cl2`.cbl echo about to compile `basename $i .cl2`.cbl >> COMPALL.err cob options and directives `basename $i .cl2`.cbl ReturnCode=$? if [ $ReturnCode -ne 0 ] then echo "Error detected during cob of `basename $i .cbl`" >> COMPALL.err else echo "Compile completed for `basename $i .cl2`" >> COMPALL.err rm `basename $i .cl2`.cbl fi fi done|
The directory contains a shell script , which builds the sample accounting application. You can use it as a model to build your own scripts.
As an alternative to using script files, you can use a to compile COBOL programs. The advantage of using a is that it can selectively compile only those programs whose source has changed.
Note - Before using a , you must understand the concepts of the function.
The following code example illustrates a that translates and compiles COBOL programs whose source code has changed since the last time the was executed.
|# *********************************************** # CICS Application Programming Primer # Enter into Catalog: # dataset reclen keylen type # ACCTFIL 5 KSDS # ACCTIX 63 17 KSDS # *********************************************** # *********************************************** # rules # *********************************************** .SUFFIXES: .clt .cbl .int .gnt .bms .map .clt.cbl: rm -f $*.cbl ( kixclt $*.clt ) .cbl.int: rm -f $*.int $*.idy cob -ia $(COBFLAGS) $< .cbl.gnt: rm -f $*.gnt cob -u $(COBFLAGS) $< .bms.map: rm -f $*.map $*.err $*.lst kixbms -a $< # *********************************************** # variables to rules # *********************************************** # Cobflags for CLT modules COBFLAGS=-C "ibmcomp cics noalter osvs defaultbyte=0" # Cobflags for CL2 modules COBFLAGS1=-C "ibmcomp noalter osvs defaultbyte=0" # *********************************************** # standard variables # *********************************************** # *********************************************** # standard targets # *********************************************** all: $(INTTARGETS) INTTARGETS: ACCTint ACCTint ACCTint ACCTint \ ACCTint GNTTARGETS: ACCTgnt ACCTgnt ACCTgnt ACCTgnt \ ACCTgnt clean: rm -f *.gnt rm -f *.int rm -f *.idy # *********************************************** # Targets with dependencies # *********************************************** ACCTint: ACCTclt ACCTcbl ACCTint: ACCTclt ACCTcbl ACCTint: ACCTclt ACCTcbl ACCTint: ACCTclt ACCTcbl ACCTint: ACCTclt ACCTcbl ACCTgnt: ACCTclt ACCTcbl ACCTgnt: ACCTclt ACCTcbl ACCTgnt: ACCTclt ACCTcbl ACCTgnt: ACCTclt ACCTcbl ACCTgnt: ACCTclt ACCTcbl|
Compiling COBOL Programs to for Production Systems
You must compile your COBOL programs for execution in mode for a production system. The files are native code and execute faster than code.
In a test environment, if you want to use Micro Focus Animator, refer to the Micro Focus documentation for the appropriate options.
Compiling Online PL/I Programs
The Set Compiler Options screen for PL/I shown in FIGURE enables you to customize the actions of the Open PL/I compiler.
To Display the Set PL/I Compiler Options Screen
1. Select a PL/I program file on the Compilation menu (FIGURE ).
2. Press PF6.
[ D ]
Name of the currently selected file displays as the default. You can change the file name; up to 14 characters.
Defaults to the directory name entered on the Compilation menu. The environment can be any directory. You can use an environment variable as the first element in the output environment field, followed by other subdirectories separated by slashes.
PL/I Compiler Options
The following compiler options are set automatically based on the extension of the selected file.
Open PL/I commands only.
Open PL/I with commands.
Open PL/I with commands and database (Oracle) commands.
Note - Do not mix Liant Open PL/I filename extensions with COBOL filename extensions in a single set of selections. If you do, the error message is displayed.
Other options are set by modifying the default values on the screen. The options on the Set Compiler Options screen for PL/I are listed in the following table with the corresponding Liant Open PL/I options. Refer to the Open PL/I User's Guide for more information.
Open PL/I Option
Used for debugging with CodeWatch
Produces expanded listing
Produces storage allocation map in listing
Unaligned PL/I structures at level 1
Level of optimization
Specifies to use CodeWatch
CICS dbg CW
Allows CodeWatch to debug precompiler-generated code
These options plus other user-specific options are maintained in a file called user-name, where user-name is the user's login name. The options are saved from session to session.
To Compile the Program
Press PF4 on the Set Compiler Options screen.
This executes the shell script, which calls the Liant Open PL/I compiler, the Oracle pre-compiler ( extension), or the preprocessing translator, depending on the filename extension of the source file. If multiple files are selected, the files are compiled in reverse order; the last file selected is compiled first.
When the compilation completes, the results of the compile and translation are displayed in the default editor ().
Assembling BMS Maps
You can set BMS Assembler options and assemble your BMS maps either from the Compilation Menu or from the command line.
Using the Compilation Menu
The Set Assembler Options screen enables you to customize the BMS assembler's actions.
To Display the Set Assembler Options Screen
1. Select a file with a extension on the Compilation menu (FIGURE ).
2. Press PF6.
[ D ]
Edit the following values on the screen:
Name of the currently selected file displays by default. You can change the filename; up to 14 characters.
Defaults to the directory name on the Compilation menu. The environment can be any directory in which any element can be an environment variable designated with a leading dollar sign. The environment variable can be preceded or followed by other subdirectories delimited with slashes.
Generate Language copy member
Create a COBOL copybook, PL/I include file, or C header file. The type of copy member created depends on the value of in the file.
: Create the copy member
: Do not create the copy member
Generate List file output
Create a list file showing the results of the assembly.
: Creates a temporary file in the editor and displays it on your screen.
: Do not create a listing file.
To Assemble the Map
Press PF4 on the Set Assembler Options screen.
This executes the shell script, which calls the BMS assembler, . If multiple files are selected, the files are assembled in reverse order; the last file selected is assembled first.
After each file is assembled, the default editor () displays the results of the assembly.
Using the Command Line-Interface to Assemble Maps
Use the command to assemble BMS maps. You can specify one or more files with extensions to assemble; creates map files with extensions.
Example: Type the following command at the command prompt to assemble a BMS map named and produce a copy member for inclusion in the programs. The output is a file named .
See Chapter 9 for more information about managing maps and refer to the Sun Mainframe Transaction Processing Software Reference Guide for a description of all the options.
Copyright , Sun Microsystems, Inc. All rights reserved.
- Full dress motorcycles
- Bdnews24 bangla
- Camo vector free
- Minato senjutsu
- Concrete cutter makita
- Covert bpd
- 4dpo headache
- Custom hunting knives org
- Explorer unscramble