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: Start of changeSOURCE(DEC)End of change

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.

Start of change
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).
Start of changeHEXEnd of change
Start of changeIf SOURCE(HEX) is in effect, the line numbers for the listing of the source will be in hexadecimal format. End of change
Start of changeYou can specify SOURCE(HEX) as a compiler invocation option or in the PROCESS or CBL statement in your COBOL source program. End of change
Start of changeSOURCE(HEX) cannot be specified as an installation default.End of change
Start of change
Note: Start of change
  • 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.
End of change
End of change
End of change

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.

Start of changeThe 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.         
End of change

Example: MAP output

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