Db2 Program Preparation panel
The Db2 Program Preparation panel lets you choose which specific program preparation function to perform.
For the functions you choose, you can also choose to display the associated panels to specify options for performing those functions. Some of the functions you can select are:
- Precompile
- The panel for this function lets you control the Db2 precompiler.
- Bind a package
- The panel for this function lets you bind your program's DBRM to a package and change your defaults for binding the packages.
- Bind a plan
- The panel for this function lets you create your program's application plan and change your defaults for binding the plans.
- Compile, link, and run
- The panel for these functions let you control the compiler or
assembler and the linkage editor. TSO and batch: For TSO programs, you can use the program preparation programs to control the host language run time processor and the program itself.
The Program Preparation panel also lets you change the DB2I default values, and perform other precompile and prelink functions.
On the Db2 Program Preparation panel, shown in the following figure, enter the name of the source program data set (this example uses SAMPLEPG.COBOL) and specify the other options you want to include. When finished, press ENTER to view the next panel.
DSNEPP01 DB2 PROGRAM PREPARATION SSID: DSN
COMMAND ===>_
Enter the following:
1 INPUT DATA SET NAME .... ===> SAMPLEPG.COBOL
2 DATA SET NAME QUALIFIER ===> TEMP (For building data set names)
3 PREPARATION ENVIRONMENT ===> FOREGROUND (FOREGROUND, BACKGROUND, EDITJCL)
4 RUN TIME ENVIRONMENT ... ===> TSO (TSO, CAF, CICS, IMS, RRSAF)
5 OTHER DSNH OPTIONS ..... ===>
(Optional DSNH keywords)
Select functions: Display panel? Perform function?
6 CHANGE DEFAULTS ........ ===> Y (Y/N)
7 PL/I MACRO PHASE ....... ===> N (Y/N) ===> N (Y/N)
8 PRECOMPILE ............. ===> Y (Y/N) ===> Y (Y/N)
9 CICS COMMAND TRANSLATION ===> N (Y/N)
10 BIND PACKAGE ........... ===> Y (Y/N) ===> Y (Y/N)
11 BIND PLAN............... ===> Y (Y/N) ===> Y (Y/N)
12 COMPILE OR ASSEMBLE .... ===> Y (Y/N) ===> Y (Y/N)
13 PRELINK................. ===> N (Y/N) ===> N (Y/N)
14 LINK.................... ===> N (Y/N) ===> Y (Y/N)
15 RUN..................... ===> N (Y/N) ===> Y (Y/N)
The following explains the functions on the Db2 Program Preparation panel and how to complete the necessary fields in order to start program preparation.
- 1 INPUT DATA SET NAME
- Lets you specify the input data set name. The input data set name
can be a PDS or a sequential data set, and can also include a member
name. If you do not enclose the data set name in apostrophes, a standard
TSO prefix (user ID) qualifies the data set name.
The input data set name you specify is used to precompile, bind, link-edit, and run the program.
- 2 DATA SET NAME QUALIFIER
- Lets you qualify temporary data set names involved in the program
preparation process. Use any character string 1–8 characters
that conforms to normal TSO naming conventions. (The default is TEMP.)
For programs that you prepare in the background or that use EDITJCL for the PREPARATION ENVIRONMENT option, Db2 creates a data set named tsoprefix.qualifier.CNTL to contain the program preparation JCL. The name tsoprefix represents the prefix TSO assigns, and qualifier represents the value you enter in the DATA SET NAME QUALIFIER field. If a data set with this name already exists, Db2 deletes it.
- 3 PREPARATION ENVIRONMENT
- Lets you specify whether program preparation occurs in the foreground
or background. You can also specify EDITJCL, in which case you are
able to edit and then submit the job. Use:
- FOREGROUND to use the values you specify on the Program Preparation panel and to run immediately.
- BACKGROUND to create and submit a file containing a DSNH CLIST that runs immediately using the JOB control statement from either the DB2I Defaults panel or your site's SUBMIT exit. The file is saved.
- EDITJCL to create and open a file containing a DSNH CLIST in edit mode. You can then submit the CLIST or save it.
- 4 RUN TIME ENVIRONMENT
- Lets you specify the environment (TSO, CAF, CICS®, IMS,
RRSAF) in which your program runs.
All programs are prepared under TSO, but can run in any of the environments. If you specify CICS, IMS, or RRSAF, then you must set the RUN field to NO because you cannot run such programs from the Program Preparation panel. If you set the RUN field to YES, you can specify only TSO or CAF.
(Batch programs also run under the TSO Terminal Monitor Program. You therefore need to specify TSO in this field for batch programs.)
- 5 OTHER DSNH OPTIONS
- Lets you specify a list of DSNH options that affect the program
preparation process, and that override options specified on other
panels. If you are using CICS,
these can include options you want to specify to the CICS command translator.
If you specify options in this field, separate them by commas. You can continue listing options on the next line, but the total length of the option list can be no more than 70 bytes.
Fields 6 through 15 let you select the function to perform and to choose whether to show the DB2I panels for the functions you select. Use Y for YES, or N for NO.
If you are willing to accept default values for all the steps, enter N under Display panel? for all the other preparation panels listed.
To make changes to the default values, entering Y under Display panel? for any panel you want to see. DB2I then displays each of the panels that you request. After all the panels display, Db2 proceeds with the steps involved in preparing your program to run.
Variables for all functions used during program preparation are maintained separately from variables entered from the DB2I Primary Option Menu. For example, the bind plan variables you enter on the Program Preparation panel are saved separately from those on any Bind Plan panel that you reach from the Primary Option Menu.
- 6 CHANGE DEFAULTS
- Lets you specify whether to change the DB2I defaults. Enter Y in the Display panel? field next to this option; otherwise enter N. Minimally, you should specify your subsystem identifier and programming language on the Defaults panel.
- 7 PL/I MACRO PHASE
- Lets you specify whether to display the
Program Preparation: Compile, Link, and Run
panel to control the PL/I macro phase by entering PL/I options in the OPTIONS field of that panel. That panel also displays for options COMPILE OR ASSEMBLE, LINK, and RUN.This field applies to PL/I programs only. If your program is not a PL/I program or does not use the PL/I macro processor, specify N in the Perform function field for this option, which sets the Display panel? field to the default N.
- 8 PRECOMPILE
- Lets you specify whether to display the Precompile panel. To see this panel enter Y in the Display panel? field next to this option; otherwise enter N.
- 9 CICS COMMAND TRANSLATION
- Lets you specify whether to use the CICS command
translator. This field applies to CICS programs
only. IMS and TSO: If you run under TSO or IMS, ignore this step; this allows the Perform function field to default to N.CICS: If you are using CICS and have precompiled your program, you must translate your program using the CICS command translator.
The command translator does not have a separate DB2I panel. You can specify translation options on the Other Options field of the Db2 Program Preparation panel, or in your source program if it is not an assembler program.
Because you specified a CICS run time environment, the Perform function column defaults to Y. Command translation takes place automatically after you precompile the program.
- 10 BIND PACKAGE
- Lets you specify whether to display the Bind Package panel. To see it, enter Y in the Display panel? field next to this option; otherwise, enter N.
- 11 BIND PLAN
- Lets you specify whether to display the Bind Plan panel. To see it, enter Y in the Display panel? field next to this option; otherwise, enter N.
- 12 COMPILE OR ASSEMBLE
- Lets you specify whether to display the
Program Preparation: Compile, Link, and Run
panel. To see this panel enter Y in the Display panel? field next to this option; otherwise, enter N. - 13 PRELINK
- Lets you use the prelink utility to make your C, C++, or Enterprise COBOL for z/OS® program reentrant. This utility concatenates compile-time initialization information from one or more text decks into a single initialization unit. To use the utility, enter Y in the Display panel? field next to this option; otherwise, enter N. If you request this step, then you must also request the compiler step and the link-edit step.
- 14 LINK
- Lets you specify whether to display the
Program Preparation: Compile, Link, and Run
panel. To see it, enter Y in the Display panel? field next to this option; otherwise, enter N. If you specify Y in the Display panel? field for the COMPILE OR ASSEMBLE option, you do not need to make any changes to this field; the panel displayed for COMPILE OR ASSEMBLE is the same as the panel displayed for LINK. You can make the changes you want to affect the link-edit step at the same time you make the changes to the compiler step. - 15 RUN
- Lets you specify whether to run your program. The RUN option is
available only if you specify TSO or CAF for RUN TIME ENVIRONMENT.
If you specify Y in the Display panel? field for the COMPILE OR ASSEMBLE or LINK option, you can specify N in this field, because the panel displayed for COMPILE OR ASSEMBLE and for LINK is the same as the panel displayed for RUN.
IMS and CICS: IMS and CICS programs cannot run using DB2I. If you are using IMS or CICS, use N in these fields.TSO and batch: If you are using TSO and want to run your program, you must enter Y in the Perform function column next to this option. You can also indicate that you want to specify options and values to affect the running of your program, by entering Y in the Display panel column.
Pressing ENTER takes you to the first panel in the series you specified, in this example to the DB2I Defaults panel. If, at any point in your progress from panel to panel, you press the END key, you return to this first panel, from which you can change your processing specifications. Asterisks (*) in the Display panel? column of rows 7 through 14 indicate which panels you have already examined. You can see a panel again by writing a Y over an asterisk.