SOURCE

Use SOURCE to get a listing of your source program. This listing will include any statements embedded by PROCESS or COPY statements.

SOURCE option syntax

Read syntax diagramSkip visual syntax diagramSOURCE(DECHEX)NOSOURCE

Default is: SOURCE(DEC)

Abbreviations are: S | NOS

You must specify SOURCE if you want embedded messages in the source listing. The compiler will generate sequence numbers for the listing of the source in your program.

Use NOSOURCE to suppress the source code from the compiler output listing.

DEC
If SOURCE(DEC) is in effect, the line numbers for the listing of the source will be in decimal format.
SOURCE with no suboption has the same effect as SOURCE(DEC).
HEX
If SOURCE(HEX) is in effect, the line numbers for the listing of the source will be in hexadecimal format.
You can specify SOURCE(HEX) as a compiler invocation option or in the PROCESS or CBL statement in your COBOL source program.
SOURCE(HEX) cannot be specified as an installation default.
Note:
  • If SOURCE(HEX) is in effect, then compiler options NUMBER and SEQUENCE cannot be used.
  • Even with SOURCE(HEX), any runtime messages will still refer to decimal line numbers, so that when locating the source of a runtime message, the user will have to convert the decimal line number from the runtime message (or ABEND) into hexadecimal to find the relevant line in the source listing.

If you want to limit the SOURCE output, use *CONTROL SOURCE or NOSOURCE statements in your PROCEDURE DIVISION. Source statements that follow a *CONTROL NOSOURCE statement are not included in the listing until a subsequent *CONTROL SOURCE statement switches the output back to normal SOURCE format.

The following example, shows a source listing with embedded diagnostic message:
  00006C                Check-results section.                                            
  00006D                    If ec = 0 then                                                
                                                                                          
==  00006D> IGYPS0086-I "EC" is reserved in ISO/IEC FCD 1989:2002, Programming language COBOL,
                        and may be reserved in a future release of this compiler.         

Example: MAP output

Related references  
*CONTROL (*CBL) statement (Enterprise COBOL for z/OS® Language Reference)