DSN Commands

 <  Day Day Up  >  

DSN Commands

DSN commands are actually subcommands of the DSN command. DSN is a control program that enables users to issue DB2 environment commands, plan management commands, and commands to develop and run application programs. DSN commands can be run in the TSO foreground, either directly or indirectly, or in the TSO background. An example of issuing the DSN command processor indirectly in the foreground is through DB2I. (The DB2I panels accomplish most of their functions by issuing DSN commands.) DSN commands can be issued in the background with the IKJEFT01 terminal monitor program.

There are nine DSN commands:

DSN

A command processor that enables the user to issue DB2 environment commands from a TSO session or in a batch job. For example:

 DSN SYSTEM (DSN)      - DISPLAY THREAD (*) END 

The DSN command processor must be invoked before any DSN command that follows can be issued.

ABEND

Used to request and obtain a dump when problems are suspected with another DSN subcommand. Use this DSN command under the guidance of the IBM Support Center.

BIND

Builds an application plan or package from one or more database request modules.

DCLGEN

Produces the SQL DECLARE TABLE specification and a working storage data declaration section for VS/COBOL, COBOL II, PL/I, or C.

END

Terminates the DSN session and returns the user to TSO.

FREE

Deletes application plans and packages.

REBIND

Rebuilds an application plan or package when SQL statements in a program's DBRM have not been changed. REBIND also can modify the BIND parameters.

RUN

Executes an application program. The program can contain SQL statements, but this is not required.

SPUFI

Executes the SPUFI program. This subcommand can be issued only when processing under ISPF; it cannot be submitted in a batch job.


DSN Command Guidelines

Deploy the following guidelines to ensure effective use of the DSN command.

Use DB2I, Online TSO, or a Batch Job to Invoke DSN

The DSN command processor can be invoked in three ways: from the DB2I panels, online by entering DSN (which enables the user to enter subcommands at the DSN prompt), or in batch, specifying subcommands in the SYSTSIN data set.

In general, it is safest to invoke the DSN commands from the DB2I panels. Some DSN commands such as RUN and BIND , however, may need to be processed in a batch job that invokes the DSN command under the auspices of IKJEFT01 . Batch TSO is the only method IBM supplies with DB2 for running a batch DB2 program.

Refer to Chapter 18, "The Doors to DB2," for examples of issuing DSN commands through the DB2I panels.

Use END to Terminate a DSN Command Session

A DSN session is terminated by issuing the END subcommand, by issuing a new DSN command, or by pressing the attention key ( PA1 ) twice in succession.

Use the TEST Option to Trace DSN Problems

If a subcommand or function of the DSN command appears to be functioning improperly, the TEST option can be used to trace DSN commands.

Use the GROUP Option to Consider Group Attach Processing

Use the GROUP parameter to indicate that the DSN command should consider group attach processing when the specified system is not active. For example,

 

 DSN SYSTEM (DB2) GROUP (YES) 

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net