MVT COBOL Compiler Default Options

 

After I updated the COBOL compile procedures to implement a two part symbolic variable for the parameter to make it easier to deal with the necessity of overriding the SIZE and BUF options each time the compiler is executed, it occurred to me that it might be useful to find a way to change the default options for the compiler.  So I went back to the MVT System Generation and traced the path from specification of options in the Stage 1 deck to the final load module to learn what it would take to implement a method of changing the default options without doing a complete MVT System Generation.  And this page contains the results of my research.

If you aren't interested in the details of the original process, just skip to the next section - Zapping the Compiler.  The options for the generated COBOL compiler are specified on the COBOL macro in the MVT Stage 1 System Generation deck.  That macro does validation of the option parameters specified and sets switches based upon the values.  The same macro is used to generate both the E and U level COBOL compilers, but I was only interested in the U level (ANS COBOL) compiler.  The GENERATE macro calls the SGIKF200 macro if the U level switch is set.  The SGIKF200 macro produces a job in the Stage 2 deck to build the compiler load module containing the default options as three bit strings, some fullword size values, and a couple of value constants; these settings are contained in two of the CSECTs of the IKFCBL01 load module.  The job in the generated Stage 2 deck contains only a single macro call to SGIKF000 with a string of comma separated numeric values that are the representation of the keyword values supplied to the COBOL macro in the Stage 1 deck.  After following this trail I had the name of the load module containing the options and, by producing a complete listing of the source assembly for that module, the offsets and actual values inserted into the load module from the original keyword values.  Then by working backward, I was able to correlate which keyword options on the original macro resulted in the appropriate settings in the constants generated into the load module.

 

Zapping the Compiler

My goal was to create a process simple enough to use that it could be done multiple times.  After all, you might change the options and later decide after some experience that you had set on an option that you never want to have on again; so you would need to use the process to change the options again.  I used the original COBOL macro called from the Stage 1 deck as a model to write a macro to validate the options specified and, if correct, produce input cards for IMASPZAP to modify the compiler load module.  My solution provides the same validations performed as the original Stage 1 and the same messages are produced when the macro is assembled, both error messages and informational messages.  Actually the validations are the same in all cases except one - I increased the size restriction on the BUF parameter because the limit was much too small to allow the specification of a buffer size necessary to overcome the error that was the result of this exercise in the first place.

Download the archive mvtcbcfg.tgz [MD5: 37B177BEFA68F7D044C203FC568C0F4F  Size: 5 kB], which contains two jobstreams - IEBUPDTE.JCL to install the macro I wrote into a library on your system and MVTCOBOL.JCL which utilizes the macro to update the compiler load module.  The IEBUPDTE jobstream is set up to add the macro to SYSP.MACLIB, which is valid for my system, but you will probably need to change it to a valid macro library for your system.  If you have SYS2.MACLIB defined, that is a good choice, but you may simply add it to SYS1.MACLIB, which is always defined.  The MVTCOBOL jobstream is set up for the COBOL compiler to reside in SYS2.LINKLIB, so if you have installed it into another library on your system, you need to change the SYSLIB DD statement in the IMASPZAP step.  The COBOL options are specified as keywords on the MVTCOBOL macro:

  MVTCOBOL SIZE=3145728,BUF=1048576,LIB=NOLIB,SUPPRES=SUPMAP,   C
        DATAMAP=DMAP,CNDENSE=CLIST                               

All options are specified by keyword=value pairs.  The parameters that may be specified on the macro are:

[SIZE=size]
[BUF=number]
[CNDENSE={CLIST|NOCLIST}]
[DATAMAP={DMAP|NODMAP}]
[LIB={LIB|NOLIB}]
[LINECNT=lines]
[LITCHAR={APOST|QUOTE}]
[MSGLEV={FLAGW|FLAGE}]
[PROCMAP={PMAP|NOPMAP}]
[PUNCH={DECK|NODECK}]
[REFLIST={XREF|NOXREF}]
[SEQCHK={SEQ|NOSEQ}]
[SORLIST={SOURCE|NOSOURCE}]
[SPACE={SPACE1|SPACE2|SPACE3}]
[SUPPRES={SUPMAP|NOSUPMAP}]
[TRNCATE={TRUNC|NOTRUNC}]
[TYPRUN={LOAD|NOLOAD}]
[VERB={VERB|NOVERB}]

SIZE specifies the number of bytes of main storage available to the compiler. 
The value specified for size must be an integer in the range 81920 to 9999999.
The default value of size, if SIZE is not specified, is 81920.

BUF specifies the number of bytes of main storage to be used for buffer allocation by the compiler.  BUF is suballocated out of SIZE, so BUF must be smaller than SIZE.
The value specified for number must be an integer in the range 2768 to 9999999.
The default value of number, if neither SIZE or BUF are specified, is 2768.
The default value of number, if SIZE is specified and BUF is not specified, is calculated as ((SIZE-81920)/4)+2768.

CNDENSE=CLIST specifies that a condensed listing will be produced.  A condensed listing contains the source card numbers and the first generated instruction for each verb in the PROCEDURE DIVISION.
CNDENSE=NOCLIST specifies that a condensed listing will not be produced.
If this keyword parameter is omitted, NOCLIST is the default.

DATAMAP=DMAP specifies that a listing of the data names and their relative addresses will be produced for the FILE, WORKING-STORAGE, and LINKAGE SECTIONS.
DATAMAP=NODMAP specifies that a relative address listing will not be produced.
If this keyword parameter is omitted, NODMAP is the default.

LIB=LIB specifies that COPY and/or BASIS statement(s) are included in the COBOL source input.
LIB=NOLIB specifies that neither a COPY or BASIS statement are included.
If this keyword parameter is omitted, NOLIB is the default.

LINECNT specifies the number of lines to be printed on each page of the COBOL compiler output listing.
The value specified for lines must be an integer in the range 10 to 99.
The default value of lines, if LINECNT is not specified, is 60.

LITCHAR=APOST specifies that the apostrophe (') will be used to delineate literals and figurative constants.
LITCHAR=QUOTE specifies that the double quote (") will be used.
If this keyword parameter is omitted, APOST is the default.

MSGLEV=FLAGW specifies that all warning and error messages are to be printed.
MSGLEV=FLAGE specifies that warning messages are not to be printed.
If this keyword parameter is omitted, FLAGW is the default.

PROCMAP=PMAP specifies that a listing of the generated instructions for each statement in the PROCEDURE DIVISION will be produced.
PROCMAP=NOPMAP specifies that the generated instruction listing will not be produced.
If this keyword parameter is omitted, NOPMAP is the default.

PUNCH=DECK specifies that a punched deck of the object program will be produced (to the dataset allocated to the SYSPUNCH DD statement).
PUNCH=NODECK specifies that a punched deck will not be produced.
If this keyword parameter is omitted, NODECK is the default.

REFLIST=XREF specifies that a cross reference listing of data names will be produced.
REFLIST=NOXREF specifies that a cross reference listing will not be produced.
If this keyword parameter is omitted, NOXREF is the default.

SEQCHK=SEQ specifies that the sequence numbers (columns 1 through 6) of the source program statements will be checked for correct collating sequence.
SEQCHK=NOSEQ specifies that sequence checking will not be done.
If this keyword parameter is omitted, SEQ is the default.

SORLIST=SOURCE specifies that a listing of the source program statements will be produced.
SORLIST=NOSOURCE specifies that a listing of the source program statements will not be produced.
If this keyword parameter is omitted, SOURCE is the default.

SPACE= specifies the line spacing on the listing obtained when the SOURCE and/or MAP options are specified.  SPACE1 specifies single spacing; SPACE2 specifies double spacing; and SPACE3 specifies triple spacing.
If this keyword parameter is omitted, SPACE1 is the default.

SUPPRES=SUPMAP specifies that the object code listing (PMAP), the object deck (DECK), and the load module (LOAD) are not to be produced if E level diagnostic messages are produced for the source program.
SUPPRES=NOSUPMAP specifies that all output requested is to be produced even if E level diagnostics are produced.
If this keyword parameter is omitted, NOSUPMAP is the default.

TRNCATE=TRUNC specifies that binary items (COMPUTATIONAL) are to be moved to a receiving field according to the specification in the PICTURE clause.
TRNCATE=NOTRUNC specifies that movement is to be based upon the size of the field in storage (halfword, fullword, etc.).
If this keyword parameter is omitted, NOTRUNC is the default.

TYPRUN=LOAD specifies that the object program will be produced (to the dataset allocated to the SYSLIN DD statement).
TYPRUN=NOLOAD specifies that the object program will not be produced.
If this keyword parameter is omitted, LOAD is the default.

VERB=VERB specifies that procedure and verb names will be listed with the associated generated code on the PMAP listing.
VERB=NOVERB specifies that the names will not be listed.
If this keyword parameter is omitted, VERB is the default.

If validation of one or more specified keywords fails, a message will be produced on the listing for each error detected and the completion code for the step will be set to 0009, causing the suppression of the IMASPZAP execution in the following step.  The MVTCOBOL jobstream included in the archive is:

//MVTCOBOL JOB (001),'ZAP MVTCOBOL',CLASS=A,MSGCLASS=A                  
//*                                                                     
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
//* PROCESS MVTCOBOL MACRO TO BUILD ZAP STATEMENTS                    * 
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
//MACRO   EXEC ASMC,PARM='DECK,LIST,NOXREF',                            
//             MAC1='SYSP.MACLIB'                <==LIBRARY WITH MACRO  
//ASM.SYSPUNCH DD DSN=&&ZAPS,UNIT=SYSDA,DISP=(,PASS),SPACE=(TRK,(15))   
//ASM.SYSIN DD *                                                        
         PRINT NOGEN                                                    
         MVTCOBOL SIZE=3145728,BUF=1048576,LIB=NOLIB,SUPPRES=SUPMAP,   C
               DATAMAP=DMAP,CNDENSE=CLIST                               
         END                                                            
//*                                                                     
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
//* APPLY GENERATED ZAP STATEMENTS TO COBOL LOAD MODULE               * 
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
//*                                                                     
//ZAP     EXEC PGM=IMASPZAP,COND=(5,LT)                                 
//SYSPRINT  DD SYSOUT=*                                                 
//SYSLIB    DD DSN=SYS2.LINKLIB,DISP=SHR         <==COMPILER LIBRARY    
//SYSIN     DD DSN=&&ZAPS,DISP=OLD                                      
//                                                                      

In the parameters shown above, 

    SIZE=3145728 is equivalent to specifying SIZE=3072K when the compiler is invoked, and
    BUF=1048576 is equivalent to specifying BUF=1024K when the compiler is invoked.  

For reference, compare these values to the defaults (if neither SIZE or BUF is specified):

    SIZE=81920 or 80K
    BUF=2768 or 2.7K

and the values specified by default in the COBOL catalogued procedures:

    SIZE=2097152 or 2048K
    BUF=1048576 or 1024K

Using the SIZE and BUF shown in the jobstream above, I have encountered no problems running the compiler in a 4096K Region.

The printed output generated from the jobstream above may be viewed at mvtcbcfg_sysout.  

Note that the generated IMASPZAP statements do not include VER statements to verify the content before replacing.  This allows the job to be run subsequent times to set new default values in the option fields.  If you wish to revert to the original default values, you have three choices:

  1. reload the compiler from the installation tape (installing.htm)
  2. use the values shown from the first time you ran the job to code IMASPZAP statements to restore the original values (shown in the AMA122I messages)
  3. rerun the jobstream specifying option values using a compiler listing from before you changed the options with this jobstream.

The modifications made affect only the load module IKFCBL01, so if you have concerns about using this process to modify the compiler, you can always make a backup copy of that module (using IEBCOPY) before running the jobstream to change the compiler.

I have yet to encounter any problems after using this jobstream to modify the COBOL compiler installed on my system.  If you encounter problems or have suggestions for improvements, please let me know.


I hope that you have found my instructions useful.  If you have questions that I can answer to help expand upon my explanations and examples shown here, please don't hesitate to send them to me:



This page was last updated on January 30, 2015 .