As of V1.2A, the COBOL85 compiler and the CBOBOL2000 compiler can be controlled in two ways:
via SDF options or
via COMOPT statements.
The COBOL compiler generates LSD information in accordance with the control option selected when the following operands are entered:
SDF control
/START-COBOL2000-COMPILER ...,TEST-SUPPORT = AID[(...)]
Further options which influence debugging with AID can be specified in the parentheses after "AID":
The STMT-REFERENCE option specifies whether the source references are to be formed from the line numbers contained in the source program (columns 1-6) or from the line numbers assigned by the compiler.
The PREPARE-FOR-JUMPS option determines whether dummy commands are to be generated in the procedure division for every start of paragraph or section so that the AID command %JUMP can be used.
The SHARABLE-CODE option defines whether the PROCEDURE DIVISION code (without DECLARATIVES) is to be written into a separate object module.
COMOPT control
/START-EXECUTABLE-PROGRAM $.COBOL2000 ... COMOPT SYMTEST=ALL
The other COMOPT statements which can influence debugging with AID are:
COMOPT TEST-WITH-COLUMN=YES
(corresponds to SDF option STMT-REFERENCE
)COMOPT SEPARATE-TESTPOINTS=YES
(corresponds to SDF option PREPARE-FOR-JUMPS
)COMOPT GENERATE-SHARED-CODE=YES
(corresponds to SDF option SHARABLE-CODE
)
A detailed description of the corresponding operands is given in COBOL2000 (BS2000) User Guide [13].
Segmented or shareable programs
Normally the COBOL compiler also generates one object module from one source program. However, additional object modules are generated for segmented and shareable programs.
Segmentation
The sections in COBOL programs are defined by a system of segment numbers. The segment number is contained in the section header (SECTION). Segment numbers 50 through 99 designate independent segments. Separate object modules are generated for these segments.
The name of such a module comprises the PROGRAM-ID, abbreviated to 6 characters if required, to which the segment number is appended. This name is referred to as a segmentname in the AID syntax.
To allow AID to take the overlay structure of a program into consideration, you must enter %AID OV=YES.
Shareability
If a number of users (tasks) are to access individual sections of a COBOL program, the program sections can be made shareable. The COBOL compiler enables the requisite object modules to be generated using SDF or COMOPT control.
The name of such a module comprises the PROGRAM-ID, abbreviated to 7 characters if required, to which the character @ is appended. This name is referred to as a sharename in the AID syntax.