You are on page 1of 6

DB2I PRIMARY OPTION MENU

COMMAND ===> Select one of the following DB2 functions and press ENTER. 1 SPUFI (Process SQL statements) 2 DCLGEN (Generate SQL and source language declarations) 3 PROGRAM PREPARATION (Prepare a DB2 application program to run) 4 PRECOMPILE (Invoke DB2 precompiler) 5 BIND/REBIND/FREE (BIND, REBIND, or FREE plans or packages) 6 RUN (RUN an SQL program) 7 DB2 COMMANDS (Issue DB2 commands) 8 UTILITIES (Invoke DB2 utilities) D DB2I DEFAULTS (Set global parameters) X EXIT (Leave DB2I)

PF 1=HELP 2=SPLIT PF 7=UP 8=DOWN option : 1 ----------===>

3=END 9=SWAP

4=RETURN 5=RFIND 6=RCHANGE 10=LEFT 11=RIGHT 12=RETRIEVE

SPUFI

Enter the output data set name: (Must be a sequential data set) 4 DATA SET NAME ... ===> 'LEM0U17.HARI.DB2OUT'

IB

M

M

Specify processing options: 5 CHANGE DEFAULTS ===> YES (Y/N - Display SPUFI defaults panel?) 6 EDIT INPUT ...... ===> YES (Y/N - Enter SQL statements?) 7 EXECUTE ......... ===> YES (Y/N - Execute SQL statements?) 8 AUTOCOMMIT ...... ===> YES (Y/N - Commit after successful run?) 9 BROWSE OUTPUT ... ===> YES (Y/N - Browse output data set?) 10 CONNECT LOCATION ===> 2=SPLIT 3=END 4=RETURN 5=RFIND 6=RCHANGE

PF 1=HELP

A

IN

Enter the input data set name: (Can be sequential or partitioned) 1 DATA SET NAME ... ===> 'LEM0U01.SUN.QUERIES(DROP1)' 2 VOLUME SERIAL ... ===> (Enter if not cataloged) 3 DATA SET PASSWORD ===> (Enter if password protected)

FR

A
SSID: DSN A MCMILLAN PRODUCT

M

ES

.c om

PF 7=UP option :2 ---------===>

8=DOWN

9=SWAP

10=LEFT

11=RIGHT

12=RETRIEVE

--------------DCLGEN

SSID: DSN

------------------

Enter table name for which declarations are required: 1 SOURCE TABLE NAME ===> 'EMP' (Unqualified) 2 TABLE OWNER ..... ===> (Optional) 3 AT LOCATION ..... ===> (Optional) Enter destination data set: (Can be sequential or partitioned) 4 DATA SET NAME ... ===> 'LEM0U17.SAI.DBS' 5 DATA SET PASSWORD ===> (If password protected)

Enter the following: 1 INPUT DATA SET NAME .... ===> 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 ............. ===> N (Y/N) ===> Y (Y/N) 9 CICS COMMAND TRANSLATION ===> N (Y/N) 10 BIND PACKAGE ........... ===> N (Y/N) ===> Y (Y/N) 11 BIND PLAN .............. ===> N (Y/N) ===> Y (Y/N)

IB

M

M

A

IN

DB2 PROGRAM PREPARATION COMMAND ===>

FR

Enter options as desired: 6 ACTION .......... ===> ADD (ADD new or REPLACE old declaration) 7 COLUMN LABEL .... ===> YES (Enter YES for column label) 8 STRUCTURE NAME .. ===> HV-REC (Optional) 9 FIELD NAME PREFIX ===> HV(Optional) 10 DELIMIT DBCS .... ===> YES (Enter YES to delimit DBCS identifiers) 11 COLUMN SUFFIX ... ===> YES (Enter YES to append column name) 12 INDICATOR VARS .. ===> YES (Enter YES for indicator variables) option :3 ----------

A

M

ES
SSID: DSN

A MCMILLAN PRODUCT

.c om

12 13 14 15

COMPILE OR ASSEMBLE .... ===> N (Y/N) ===> Y (Y/N) PRELINK ................ ===> N (Y/N) ===> Y (Y/N) LINK ................... ===> N (Y/N) ===> Y (Y/N) RUN .................... ===> N (Y/N) ===> Y (Y/N)

options :4 -----------

Enter precompiler data sets: 1 INPUT DATA SET .... ===> 2 INCLUDE LIBRARY ... ===> 3 DSNAME QUALIFIER .. ===> TEMP 4 DBRM DATA SET ..... ===>

(For building data set names)

BIND/REBIND/FREE COMMAND ===>

FR
(Add or replace a package)

options :5 ---------

A

Enter processing options as desired: 5 WHERE TO PRECOMPILE ===> FOREGROUND BACKGROUND, or EDITJCL) 6 VERSION ........... ===> (Blank, VERSION, or AUTO) 7 OTHER OPTIONS ..... ===>

Select one of the following and press ENTER: 1 BIND PLAN (Add or replace an application plan) (Rebind existing application plan or plans)

2 REBIND PLAN

M

3 FREE PLAN

IB

M

4 BIND PACKAGE

5 REBIND PACKAGE (Rebind existing package or packages) 6 FREE PACKAGE (Erase a package or packages)

optoins : 6

A

IN

(Erase application plan or plans)

M

ES
SSID: DSN

A MCMILLAN PRODUCT

.c om
(FOREGROUND,

PRECOMPILE COMMAND ===>

SSID: DSN

-----------===> RUN SSID: DSN

Enter the following as desired: 3 PARAMETERS .. ===> 4 PLAN NAME ... ===> (Required if different from program name) 5 WHERE TO RUN ===> FOREGROUND (FOREGROUND, BACKGROUND, or EDITJCL) DB2 COMMANDS SSID: DSN Position cursor on the command line you want to execute and press ENTER Cmd 1 ===> SELECT * FROM EMP Cmd 2 ===> Cmd 3 ===> ...> Cmd 4 ===> ...> Cmd 5 ===> ...> ...> Cmd 6 ===> ...> ...> Cmd 7 ===> ...> ...> ...>

A

IN

FR
DB2 UTILITIES A MCMILLAN PRODUCT

IB

M

M

SSID: DSN ===>

Select from the following:

1 FUNCTION ===> EDITJCL (SUBMIT job, EDITJCL, DISPLAY, TERMINATE) 2 JOB ID ===> TEMP (A unique job identifier string) 3 UTILITY ===> REPORT (CHECK, CHECK DATA, COPY, DIAGNOSE, LOAD, MERGE, MODIFY, QUIESCE, RECOVER INDEX,

A

M

ES

.c om

Enter the name of the program you want to run: 1 DATA SET NAME ===> 'LEM0U17.RAVIKK.DB22(ONE)' 2 PASSWORD .... ===> (Required if data set is password protected)

RECOVER TABLESPACE, REORG INDEX, REORG TABLESPACE, REPORT, REPAIR, RUNSTATS, STOSPACE.) 4 CONTROL CARDS DATA SET ===> UTIL To RESTART a utility, specify starting point, otherwise enter NO. 5 RESTART ===> NO (NO, At CURRENT position, or beginning of PHASE)

* The data set names panel will be displayed when required by a utility. DB2I DEFAULTS COMMAND ===> Change defaults as desired:

IB

M

M

===> //LEM0U17 JOB (ACCOUNT),'NAME' ===> //* ===> //* ===> //*

****************************************************************** * DCLGEN TABLE(EMPTAB10) * * LIBRARY(LEM0U21.KBM.DCLGEN(EMPTAB10)) * * ACTION(REPLACE) * * LANGUAGE(COBOL) * * NAMES(HV-) *

A

IN

1 DB2 NAME ............. ===> DSN (Subsystem identifier) 2 DB2 CONNECTION RETRIES ===> 0 (How many retries for DB2 connection) 3 APPLICATION LANGUAGE ===> COBOL (ASM, C, CPP, COBOL, COB2, IBMCOB, FORTRAN, PLI) 4 LINES/PAGE OF LISTING ===> 60 (A number from 5 to 999) 5 MESSAGE LEVEL ........ ===> I (Information, Warning, Error, Severe) 6 SQL STRING DELIMITER ===> DEFAULT (DEFAULT, ' or ") 7 DECIMAL POINT ........ ===> . (. or ,) 8 STOP IF RETURN CODE >= ===> 8 (Lowest terminating return code) 9 NUMBER OF ROWS ....... ===> 20 (For ISPF Tables) 10 CHANGE HELP BOOK NAMES?===> NO (YES to change HELP data set names) 11 DB2I JOB STATEMENT: (Optional if your site has a SUBMIT exit)

FR

A

M

ES

A MCMILLAN PRODUCT

.c om

* * * * *

STRUCTURE(HV-REC) QUOTE LABEL(YES) COLSUFFIX(YES) INDVAR(YES)

* * *

* *

FR

****************************************************************** EXEC SQL DECLARE EMPTAB10 TABLE ( NAME CHAR(10) ) END-EXEC. ****************************************************************** * COBOL DECLARATION FOR TABLE EMPTAB10 * ****************************************************************** 01 HV-REC. * ************************************************************* * NAME 10 HV-NAME PIC X(10). ****************************************************************** * INDICATOR VARIABLE STRUCTURE * ****************************************************************** 01 IEMPTAB10. 10 INDSTRUC PIC S9(4) USAGE COMP. ****************************************************************** * THE NUMBER OF COLUMNS DESCRIBED BY THIS DECLARATION IS 1 ******************************************************************

A

M

ES

IB

M

M

A

IN

A MCMILLAN PRODUCT

.c om
*

* ... IS THE DCLGEN COMMAND THAT MADE THE FOLLOWING STATEMENTS *