Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Preparing Your Programs (COBOL User Guide)


Code Debug TSO provides an interface to Common Shared Services (CSS) online program preparation facilities that can be used to precompile, compile, and link-edit your programs or convert your existing JCL to compile your programs with CSS’s COBOL language processor. Code Debug TSO has a native preparation facility to bind programs for Db2 processing and prepare file allocation lists.

To debug a program symbolically at the source level with Code Debug , it must be compiled with the COBOL language processor. When activated, the language processor (LP) accepts the source code, invokes the specified compiler, and waits until the compile step is complete. It then analyzes the program listing, produces a source listing member, and writes the source listing member to the DDIO file. Code Debug refers to the symbolic information and maps the source representation to the load module, so that you can debug your program interactively at the source level.

Important

Code Debug requires specific compile options which may vary depending on the language type and actual version being used. A user should always see the Common Shared Services User Reference for information related to any required compiler options. Examples are: (1) Options NOTEST and NONUMBER are required for COBOL; (2) Option NOTEST is required for PL/I, and (3) Options ESD and LIST are required for Assembler. The Guide is required to assist users in manually converting Compile and Link JCL to execute the CSS Language Processor. The Guide also gives most users information on how to set up the Language Processor parameters to write a matching source listing to a DDIO file.

If you use a postprocessed source listing with Code Debug TSO, you may lose some Code Debug TSO functions. If the source listing contains the COPY SUPPRESS statement, the Code Debug TSO commands FIND, PEEK, and KEEP will not work properly.

If the source listing contains the PRINT NOGEN statement, the Code Debug TSO GEN command will not work properly.

The postprocessed source listing must be compiled with the options required for Code Debug TSO; otherwise, the results are unpredictable.

If your program is a Db2 program and Code Debug Db2 Extension and Code Debug Db2 are installed at your site and you want to dynamically insert SQL statements or use the EXPLAIN command, you must precompile, compile, link-edit your program, and bind your application plan using File-AID for Db2 DBRMs. See the Binding the Application Plan or Package for information about binding.

To access the program preparation facilities, type 1 (PREPARE) on the Code Debug TSO Primary Menu and press Enter. The Program Preparation Menu shown in the following figure is displayed.

Program Preparation Menu

 --------------------------  PROGRAM PREPARATION MENU  -------------------------
OPTION  ===>                                                                   
                                                                               
        1  CONVERT COMPILE JCL  - Convert compile JCL for Code Debug           
        2  COMPILE FACILITY     - Compile programs for Code Debug              
        3  BIND FACILITY MENU   - Bind application plans or packages           
        4  EDIT ALLOCATION LIST - Edit or Create file allocation lists         
                                                                               
                                                                               
     Both the CONVERT COMPILE JCL and the COMPILE FACILITY now invoke          
       the CSS (Common Shared Services) Compile Utilities.  Those              
       utilities also have a Profile facility that allows you to save          
       the compile parameters under a name of your choice.                     
                                                                               
                                                                               
     The facility also allows you to display a member list of existing         
       names permitting profiles to be selected, displayed or                  
       maintained (i.e., COPY, RENAME, DELETE, etc.).                          
                                                                               
                                                                               
                                                                               
                                                                               
           Press ENTER to process  or  enter END command to terminate          


The options on this menu are:

1 CONVERT COMPILE JCL

Automatically converts your compile JCL to compile your programs with the COBOL language processor. After the JCL is converted, it can be submitted for processing.

2 COMPILE FACILITY

Precompiles Db2 statements, translates CICS commands, compiles, and link-edits your programs based on the information you enter. If you are processing in batch, the JCL is automatically built to compile with the language processor and the job is submitted. If you are processing in foreground, the compile is performed using ISPF and TSO command functions.

3 BIND FACILITY MENU

Displays the BIND FACILITY MENU, which has two options: 1 BIND PLAN FACILITY and 2 BIND PACKAGE FACILITY. The first helps you set up Db2 bind plan options, specify DBRM libraries, and submit the bind. The second helps you set up Db2 bind package options and submit the bind. For more information about binding, see the Binding the Application Plan or Package.

4 EDIT ALLOCATION LIST

Invokes the File Allocation Utility (FAU) to create and allocate the files your program will need to execute. The FAU is only used when you are debugging in interactive mode, and usually only when you want to create a file list, or when problems are encountered while allocating the files. See the Using the File Allocation Utility for information about using the FAU.

The file allocation enhancement which provides your user the ability to point Code Debug at the JCL needed to run a test is known as Quickstart. Quickstart eliminates the need to utilize the File Allocation Utility (FAU) for Db2.

Options 1 and 2 are both compile facilities and are provided by linking to the corresponding CSS facility. See the Common Shared Services User Reference for information related to these options. See the referenced appendices for information about options 3 and 4.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*