![](/api/v2/epubs/0738497525/files/bg1c1.png)
Chapter 23. Compiling and converting old COBOL code with Debug Tool Utilities 443
Next, select 2: COBOL Conversion (CCCA), to define the system settings as follows:
Define the CCCA library, or LINKLIST if the library is in the MVS linklist.
Define the shared and private VSAM and non-VSAM data set qualifiers.
We recommend that you do not change the allocation sizes for the different data sets.
Press PF3 to save.
Then select 9: COBOL Convert and Compile, to define the user settings.
Eventually, change the data set qualifiers and their allocation sizes and DB2 precompiler and
CICS translator option.
Once you have finished the configuring the settings, you can use F3 until you get to the
Debug Tool Program Preparation Menu.
23.3 Start the conversion process
To actually do the conversion, you then select option 2 from the Debug Tool Program
Preparation Menu as shown in Figure 23-5.
Figure 23-5 Getting to the COBOL Convert and Compile utilities
This will bring up the Debug Tool Program Preparation - Convert and Compile page as shown
in Figure 23-6.
Note: Remember the DTU’s help function. Select the fields using the cursor and press F1.
![](/api/v2/epubs/0738497525/files/bg1c2.png)
444 Using IBM Application Development Tools for z/OS and OS/390
Figure 23-6 The top part of the Convert and Compile Panel
This panel looks very similar to the other program preparation panel for COBOL compile. The
steps to follow are:
1. Select a foreground or background convert/compile.
2. Enter the name of the OS/VS COBOL (or other COBOL) source data set.
3. Page forward to see the second half of the panel as shown in Figure 23-7.
Figure 23-7 The Bottom Part of the Convert and Compile panel
![](/api/v2/epubs/0738497525/files/bg1c3.png)
Chapter 23. Compiling and converting old COBOL code with Debug Tool Utilities 445
4. Eventually, you will need to:
– Mark for DB2 and /or CICS if EXEC SQL or EXEC CICS statements are in source.
– Add or change compiler options.
– Add SYSLIB data sets for your copybooks.
Press Enter and select the member to be converted/compiled.
The upcoming panel shows the input data set, compiler options, and all data sets for the
convert, compile, and precompile/translate step. You may modify any of these data set names
and options.
We used the following sample OS/VS COBOL program, which includes the EXHIBIT
statement as shown in Example 23-1.
Example 23-1 Original OS/VS COBOL source
IDENTIFICATION DIVISION.
PROGRAM-ID. MINI.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 X PIC 99.
PROCEDURE DIVISION.
DISPLAY "MINI!".
EXHIBIT X
DISPLAY "MINI!".
GOBACK.
Press Enter to start the foreground convert/compile. If you selected for background
compile check the upcoming JCL and press Enter.
If any of the steps did not work, browse the corresponding conversion listing files directly
from the next panel. Eventually, edit the appropriate input data sets. Example 23-2 shows
the converted source.
Example 23-2 OS/VS COBOL program after conversion
000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. MINI.
000030* PROGRAM CONVERTED BY
000040* CCCA FOR OS/390 & MVS & VM 5648-B05
000050* CONVERSION DATE 10/03/02 15:48:24.
000060 ENVIRONMENT DIVISION.
000070 DATA DIVISION.
000080 WORKING-STORAGE SECTION.
000090 77 X PIC 99.
000100 PROCEDURE DIVISION.
000110
000120 DISPLAY "MINI!".
000130
000140 DISPLAY
000150 "X = " X " "
000160 DISPLAY "MINI!".
000170
000180 GOBACK.
Get Using IBM Application Development Tools for z/OS and OS/390 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.