As noted before, the compiler's main job is to translate your COBOL program into language that the computer can process (object code). The compiler also lists errors in your source statements and provides supplementary information to help you debug and tune your program. You can direct and control compilation with the following:
Several statements help you to direct the compilation of your program.
Compiler options help to control the compilation of your program. Specify these options in the PARM field of the JCL or on the PROCESS statement in your program (see below). Or, under TSO, specify options through parameters (arguments) on the command that starts the compilation. Most of the options come in pairs. You select one or the other. For example, the option pair for a cross-reference listing is XREF/NOXREF. If you want such a listing, specify XREF. If you do not want one, specify NOXREF. Some options have sub-parameters. For example, if you want 44 lines per page on your listings, specify LINECOUNT(44).
The PROCESS (Synonym: CBL) Statement
You can code compiler options on the PROCESS statement. The PROCESS statement is placed before the Identification Division header and has the following format:
One or more blanks must separate PROCESS and the first option. Separate options with a comma or a blank. The PROCESS statement must be placed before any comment lines or compiler-directing statements. There must not be any embedded space within options. For example, FLAG (x,y) may not be written FLAG(x y).
PROCESS can start in columns 1 through 66. A sequence field is allowed in columns 1 through 6. When used with a sequence field, PROCESS can start in columns 8 through 66. If used, the sequence field must contain six characters, and the first character must be numeric.
You can use CBL as a synonym for PROCESS. CBL can start in columns 1 through 70. When used with a sequence field, CBL can start in columns 8 through 70.
You can use more than one PROCESS statement. If multiple PROCESS statements are used, they must follow one another with no intervening statement of any other type. Options cannot be continued across multiple PROCESS statements. Your programming installation can inhibit the use of PROCESS statements with the default options module of the COBOL compiler. When PROCESS statements are found in a COBOL program where they are-not allowed by the installation, the COBOL compiler generates error diagnostics.
Selecting Compiler Options
You can specify compiler options in several different ways, depending on the system you are using for compilation:
Default Values for Compiler Options
The default options that were set up when your compiler was installed will be in effect for your program unless you override them with other options. (In some installations, certain compiler options are set up as fixed so that you cannot override them. If you have problems, see your system administrator.) To find out the default compiler options in effect, run a test compilation without specifying any options. The output listing will list the default options specified by your installation.
Precedence of Compiler Options
Compiler options are recognized in the order of precedence below:
Within this hierarchy of precedence, there are also rules for conflicting and mutually exclusive options.
Conflicting Compiler Options
The positive form of the compiler option and its negative form, for example, DECK and NODECK, are opposing options. If you specify both of them on the same level in the hierarchy listed above, the option specified last takes effect. For example, within your PROCESS (or CBL) statement or within your JCL PARM= statement, the option specified last takes effect. In addition to the directly opposing options, a few of the compiler options are mutually exclusive. That is, when you specify one of the options in column A of the following table, the option in column B is normally ignored, and the option in column C is forced on. For example, if you specify both OFFSET and LIST in your PROCESS statement in any order OFFSET takes effect and LIST is ignored. However, results can vary depending on the level at which you specify the option.
For example, if you specify OFFSET in your JCL statement but LIST in your PROCESS statement, LIST will take effect because the options specified in the PROCESS statement and any options forced on by an option specified in the PROCESS statement have higher precedence.
What if one of the options from column A is set up as a default for your system and you want to use a conflicting option from column B? It is possible that an option may be set up at the installation level as a fixed option, in which case the options it conflicts with cannot be put into effect by individual programmers.
But if the option from column A is a non-fixed default option, you can put a conflicting option from column B in effect by specifying it on your PROCESS statement or in your JCL PARM= statement.
For example, if OFFSET is your system default (non-fixed) but You want to use LIST for your program, you can do so by specifying LIST in your PROCESS statement or JCL PARM=statement. If TEST is your system default (non-fixed) and If NORES is specified in your JCL and if RENT and DYNAM are specified in your PROCESS statement, then the resulting options will be TEST, RENT, DYNAM, and RES. Why? TEST would normally force RES, because TEST and NORES are mutually exclusive options. NORES specified on the JCL PARM statement could override the RES that TEST forced. But the specification of RENT in your PROCESS statement forces RES on, overriding the JCL card.
If RENT is specified in your JCL, and if NORES is specified in your PROCESS statement, then the resulting options in effect will be NORENT and NQJES. Why? Because the NORES option specified in the PROCESS statement is mutually exclusive with the RENT option, and options specified in the PROCESS statement have higher precedence than options specified on the JCL. If, however, RENT were a fixed installation default, RES would be forced into effect and the NORES specified in the PROCESS statement would, because of lower precedence, have no effect.
Performance Considerations with Compiler Options
There are a number of performance considerations you should be aware of when using compiler options. The DYNAM. FASTSRT, FDUMP, OPTIMIZE, NUMPROC, RENT. RESIDENT, SSRANGE, TEST, and TRUNC compiler options can all affect run-time performance.
Option Settings for COBOL 85 Standard Compilation
The following compiler options are required to conform to COBOL 85 Standard specification:
In addition, the run-time option A1XBLD must be specified.
IBM Mainframe Related Interview Questions
|IBM Lotus Notes Interview Questions||IBM-CICS Interview Questions|
|COBOL Interview Questions||Linux Interview Questions|
|IBM-JCL Interview Questions||IBM Mainframe Interview Questions|
|IBM AIX Interview Questions||IBM WAS Administration Interview Questions|
|IBM Lotus Domino Interview Questions||IBM Integration Bus Interview Questions|
|Mainframe DB2 Interview Questions||Unix Production Support Interview Questions|
Ibm Mainframe Tutorial
Introduction To Software Development
Introduction To Ibm Mainframes
Tso And Ispf
Jes2, ]es3 And Sms
Introduction To Job Control Language (jcl)
The Job Statement
The Exec Statement
The Job And Exec Statements
The Dd Statement
Procedures And Symbolic Parameters
Generation Data Groups (gdg), Compile/link-edit And Run Jcls
Access Method Services (ams)
Additional Vsam Commands
Introduction To Rexx
Overview Of Rexx
Introduction To Cics
Exception Handling In Cics
Developing A Cics Application
Cics Programming Techniques
Basic Mapping Support (bms)
Transient Data Control
Temporary Storage Control
Interval And Task Control
Cics Application Design
Recovery And Restart
System Security And Intersystem Communication
Cics Debugging Facilities And Techniques
Bms Map Definition Macros And Copylib Members
Cics Response And Abend Codes
Data, Information And Information Processing
Introduction To Database Management Systems
Introduction To Relational Database Management Systems
Database Architecture And Data Modeling
Overview Of Db2
Structured Query Language (sql)
Data Security And Access
Db2 Application Development
Qmf And Db2i
Db2 Performance Monitoring, Utilities And Recovery/restart
Overview Of Information Management System (ims)
Introduction To Vs Cobol Ii
Overview Of Application Development In Vs Cobol Ii
Overview Of The Cobol Program
Sorting And Merging Files
Coding Cobol Programs That Run Under Cics. Ims, Db2 And Ispf
Compiling The Program
Link-editing The Program
Executing The Program
Improving Program Performance
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.