Appendix C. Examples: Preparing programs and modifying setup files with Debug Tool Utilities
These examples show you how to use Debug Tool Utilities to prepare your programs
and how to create, manage, and use a setup file. The examples guide you through
the following tasks:
- Creating personal data sets with the correct attributes.
- Starting Debug Tool Utilities.
- Compiling or assembling your program by using Debug Tool Utilities. If you
do not use Debug Tool Utilities, you can build your program through your usual
methods and resume this example with the next step.
- Modifying and using a setup file to run your program in the foreground
or in batch.
Creating personal data sets
Create the data sets with the names and attributes described below. Allocate
5 tracks for each of the data sets. Partitioned data sets should be specified
with 5 blocks for the directory.
Table 18. Names and attributes to use when you create your own data sets.
| Data set name |
LRECL |
BLKSIZE |
RECFM |
DSORG |
| * You can use any block size
that is valid. |
| prefix.SAMPLE.COBOL |
80 |
* |
FB |
PO |
| prefix.SAMPLE.PLI |
80 |
* |
FB |
PO |
| prefix.SAMPLE.C |
80 |
* |
FB |
PO |
| prefix.SAMPLE.ASM |
80 |
* |
FB |
PO |
| prefix.SAMPLE.DTSF |
1280 |
* |
VB |
PO |
Copy the following members of the hlq.SEQASAMP data set into the
personal data sets you just created:
| SEQASAMP member name |
Your sample data set |
Description of member |
| EQAWPP1 |
prefix.SAMPLE.COBOL(WPP1) |
COBOL source code |
| EQAWPP3 |
prefix.SAMPLE.PLI(WPP3) |
PL/I source code |
| EQAWPP4 |
prefix.SAMPLE.C(WPP4) |
C source code |
| EQAWPP5 |
prefix.SAMPLE.ASM(WPP5) |
Assembler source code |
| EQAWSU1 |
prefix.SAMPLE.DTSF(WSU1) |
setup file for EQAWPP1 |
| EQAWSU3 |
prefix.SAMPLE.DTSF(WSU3) |
setup file for EQAWPP3 |
| EQAWSU4 |
prefix.SAMPLE.DTSF(WSU4) |
setup file for EQAWPP4 |
| EQAWSU5 |
prefix.SAMPLE.DTSF(WSU5) |
setup file for EQAWPP5 |
Starting Debug Tool Utilities
To start Debug Tool Utilities, do one the following options:
The Debug Tool Utilities primary panel (EQA@PRIM) is displayed. On the command
line, enter the PANELID command. This command displays the name
of each panel on the upper left corner of the screen. These names are used
as navigation aids in the instructions provided in this section. After you
complete these examples, you can stop the display of these names by entering
the PANELID command.
Compiling or assembling your program by using Debug Tool Utilities
To compile your program, do the following steps:
- In panel EQA@PRIM, select 1. Press Enter.
-
In panel EQAPP, select one of the following option
and then press Enter.
- 1 to compile a COBOL program.
- 3 to compile a PL/I program
- 4 to compile a C or C++ program
- 5 to assemble an assembler program
- One of the following panels is displayed, depending on the language you
selected in step 2:
- EQAPPC1 for COBOL programs. Enter the following information in the fields
indicated:
- Project = prefix
- Group= SAMPLE
- Type=COBOL
- Member=WPP1
- EQAPPC3 for PL/I programs.
- Project = prefix
- Group= SAMPLE
- Type=PLI
- Member=WPP3
- EQAPPC4 for C and C++ programs.
- Project = prefix
- Group= SAMPLE
- Type=C
- Member=WPP4
- EQAPPC5 for assembler programs.
- Project = prefix
- Group= SAMPLE
- Type=ASM
- Member=WPP5
- If you are preparing an assembler program, enter the location of your
CEE library in the Syslib data set Name field. For example: 'CEE.SCEEMAC'
- Enter '/' to edit options and specify a naming pattern for the output
data sets in the field Data set naming pattern. Press Enter.
-
One of the following panels is displayed, depending
on the language you selected in step 2:
- EQAPPC1A for COBOL programs.
- EQAPPC3A for PL/I programs.
- EQAPPC4A for C and C++ programs.
- EQAPPC5A for assembler programs.
Look at the panel to review the following information:
- test compiler options
- naming patterns for output data sets
Press PF3 (Exit).
- One of the following panels is displayed, depending on the language you
selected in step 2:
- EQAPPC1 for COBOL programs.
- EQAPPC3 for PL/I programs.
- EQAPPC4 for C and C++ programs.
- EQAPPC5 for assembler programs.
Select "F" to process these programs in the foreground. Specify "N" for CICS® translator and "N" for DB2® precompiler. None of these programs contain CICS or DB2 instructions. Press Enter.
- One of the following panels is displayed, depending on the language you
selected in step 2:
- EQAPPC1B for COBOL programs.
- EQAPPC3B for PL/I programs.
- EQAPPC4B for C and C++ programs.
- EQAPPC5B for assembler programs.
Make a note of the data set name for Object compilation output. For a
COBOL program, the data set name will look similar to the following name: prefix.SAMPLE.OBJECT(WPP1). You will use this name when you link
your object modules. Press Enter.
- If panel EQAPPA1 is displayed, press Enter.
- One of the following panels is displayed, depending on the language you
selected in step 2:
- EQAPPC1C for COBOL programs.
- EQAPPC3C for PL/I programs.
- EQAPPC4C for C and C++ programs.
- EQAPPC5C for assembler programs.
Check for a 0 or 4 return code. Type a "b" in the Listing
field. Press Enter.
- In panel ISRBROBA, browse the file to review the messages. When you are
done reviewing the messages, press PF3 (Exit).
- One of the following panels is displayed, depending on the language you
selected in step 2:
- EQAPPC1C for COBOL programs.
- EQAPPC3C for PL/I programs.
- EQAPPC4C for C and C++ programs.
- EQAPPC5C for assembler programs.
Press PF3 (Exit).
- One of the following panels is displayed, depending on the language you
selected in step 2:
- EQAPPC1B for COBOL programs.
- EQAPPC3B for PL/I programs.
- EQAPPC4B for C and C++ programs.
- EQAPPC5B for assembler programs.
Press PF3 (Exit).
- One of the following panels is displayed, depending on the language you
selected in step 2:
- EQAPPC1 for COBOL programs.
- EQAPPC3 for PL/I programs.
- EQAPPC4 for C and C++ programs.
- EQAPPC5 for assembler programs.
Press PF3 (Exit).
- In panel EQAPP, press PF3 (Exit) to return to EQA@PRIM panel.
To link your object modules, do the following steps:
- In panel EQA@PRIM, select 1. Press Enter.
- In panel EQAPP, select L. Press Enter.
- In panel EQAPPCL, specify "F" to process the programs in the
foreground. Then, choose one of the following options, depending on the language
you selected in step 2:
- For the COBOL program, use the following values for each field: Project
= prefix, Group= SAMPLE, Type=OBJECT, Member=WPP1
- For the PL/I program, use the following values for each field: Project
= prefix, Group= SAMPLE, Type=OBJECT, Member=WPP3
- For the C program, use the following values for each field: Project = prefix, Group= SAMPLE, Type=OBJECT, Member=WPP4
- For the assembler program, use the following values for each field: Project
= prefix, Group= SAMPLE, Type=OBJECT, Member=WPP5
-
In panel EQAPPCL, specify the name of
the other libraries you need to link to your program. For example, in the
field Syslib data set Name, specify the prefix of your CEE library: 'CEE.SCEELKED'. Press Enter.
-
In panel EQAPPCLB, make a note of the data set name
in the Load link-edit output field. You will use this name when you modify
a setup file. Press Enter.
- If panel EQAPPA1 is displayed, press Enter.
- In panel EQAPPCLC, check for a 0 return code. Type a "V" in
the Listing field. Press Enter.
- In panel ISREDDE2, review the messages. After you review the messages,
press PF3 (Exit).
- In panel EQAPPCLC, press PF3 (Exit).
- In panel EQAPPCLB, press PF3 (Exit).
- In panel EQAPPCL, press PF3 (Exit).
- In panel EQAPP, press PF3 (Exit) to return to EQA@PRIM panel.
Modifying and using a setup file
This example describes how to modify a setup file and then use it to run
the examples in the TSO foreground or run the examples in the background by
submitting a MVS batch job.
Run the program in foreground
To modify and run the setup file so your program runs in the foreground,
do the following steps:
-
In panel EQA@PRIM, select 2. Press Enter.
- In panel EQAPFOR, select one of the following choices, depending on which
language you selected in step 2:
- For the COBOL program, use the following values for each field: Project
= prefix, Group= SAMPLE, Type=DTSF, Member
= WSU1
- For the PL/I program, use the following values for each field: Project
= prefix, Group = SAMPLE, Type=DTSF, Member=WSU3
- For the C program, use the following values for each field: Project = prefix, Group= SAMPLE, Type=DTSF, Member=WSU4
- For the assembler program, use the following values for each field: Project
= prefix, Group= SAMPLE, Type=DTSF, Member=WSU5
Press Enter.
- In panel EQAPFORS, do the following steps:
- Replace &LOADDS. with the name of the load data set from
step 5 of instructions on how to link the object
modules.
- Replace &EQAPRFX. with the prefix your EQAW (Debug Tool) library.
- Replace &CEEPRFX. with the prefix your CEE (Language Environment)
library.
- Enter "e" in Cmd field next to CMDS DD name. In the window
that is displayed, if there is a QUIT ; statement at the end of
the data set, remove it. Press PF3 (Exit).
- Type "run" in command line. Press Enter.
- Debug Tool is started and the Debug Tool window is displayed. Enter any valid Debug Tool commands
to verify that you can debug the program. Enter "qq" in the command
line to stop Debug Tool and close the Debug Tool window.
- In panel EQAPFORS, check the return code message:
- For the COBOL program, the return code (RC) is 0.
- For the PL/I program, the return code (RC) is 1000.
- For the C program, the return code (RC) is 0.
- For the assembler program, the return code (RC) is 0.
Press PF3 (Exit). All the changes made to the setup file are saved.
- In panel EQAPFOR, press PF3 (Exit) to return to the panel EQA@PRIM.
Run the program in batch
To modify and run the setup file so that the program runs in batch, do
the following steps:
- In panel EQA@PRIM, select 0. Press Enter.
- In panel EQAPDEF, review the job card information. If there are any changes
that need to be made, make them. Press PF3 (Exit).
- In panel EQA@PRIM, select 2. Press Enter.
- In panel EQAPFOR, select one of the following choices, depending on which
language you selected in step 2:
- For the COBOL program, use the following values for each field: Project
= prefix, Group = SAMPLE, Type = DTSF, Member
=WSU1
- For the PL/I program, use the following values for each field: Project
= prefix, Group = SAMPLE, Type = DTSF, Member
=WSU3
- For the C program, use the following values for each field: Project = prefix, Group = SAMPLE, Type = DTSF, Member = WSU4
- For the assembler program, use the following values for each field: Project
= prefix, Group = SAMPLE, Type = DTSF, Member
= WSU5
Press Enter.
- If you ran the steps beginning on page 1 (running the program in foreground), you can skip this step.
In panel EQAPFORS, do the following steps:
- Replace &LOADDS. with the name of the load data set from
step 5 of instructions on how to link the object
modules.
- Replace &EQAPRFX. with the prefix your EQAW (Debug Tool) library.
- Replace &CEEPRFX. with the prefix your CEE (Language Environment)
library.
- Enter "e" in the Cmd field next to CMDS DD name. If there is
not 'QUIT ;' statement at the end of the data set, then add the
statement. Press PF3 (Exit).
- Type submit in command line. Press Enter.
- In panel ISREDDE2, type submit in the command line. Press Enter.
Make a note of the job number that is displayed.
- In panel ISREDDE2, press PF3 (Exit).
- In panel EQAPFORS, press PF3 (Exit). The changes you made to the setup
file are saved.
- In panel EQAPFOR, press PF3 (Exit) to return to EQA@PRIM panel. locate
the job output using the job number recorded. Check for zero return code and
the command log output at the end of the job output.
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)