Issuing commands to DB2 using the DSNC transaction

The DSNC transaction allows you to enter DB2 commands from CICS.

Environment

This command can be issued only from a CICS terminal.

Syntax

DSNC syntax

Read syntax diagramSkip visual syntax diagramDSNC  destinationdb2-command

Abbreviation

You can omit DSNC from the DB2 command if the relevant transaction definition is installed from the CICS DB2 sample group, DFH$DB2. For example, if you are installing the -DIS transaction definition.
 
DSNC -DIS THD(*)
can be abbreviated to:
 
-DIS THD(*)
The sample CICS DB2 group, DFH$DB2, contains the following transaction definitions for issuing DB2 commands:

Authorization

Issuing DB2 commands using DSNC does not require any authorization from CICS over and above transaction attach security required to run the DSNC transaction. It does, however, require DB2 privileges. For more information about CICS security, see Security for DB2.

Parameter description

destination
Identifies another terminal to receive display information. It must be a valid terminal that is defined to CICS and supported by basic mapping support (BMS).
db2-command
Specifies the exact DB2 command that you want to enter from a CICS terminal. It must be preceded by a hyphen.

Usage note

Screen scrolling
BMS paging support can be used to support the scrolling of DSNC DB2 commands from your terminal. For example specify SIT keywords:
PGCHAIN=X/,
PGCOPY=C/,
PGPURGE=T/,
PGRET=P/,
SKRPF7='P',
SKRPF8='N',
For further information about the SIT keywords and parameters, see The system initialization parameter descriptions and summary.

Example

Issue the DB2 command -DISPLAY THREAD from a CICS terminal to display threads for a CICS with applid IYK4Z2G1.
 
        DSNC -DISPLAY THREAD(IYK4Z2G1)
Figure 1. Sample output from DSNC -DISPLAY command
 
 DSNV401I : DISPLAY THREAD REPORT FOLLOWS -
 DSNV402I : ACTIVE THREADS -
 NAME     ST A   REQ ID           AUTHID   PLAN     ASID TOKEN
 IYK4Z2G1 N        3              JTILLI1           00BA     0
 IYK4Z2G1 T        3 ENTRXC060001 CICSUSER TESTC06  00BA    16
 IYK4Z2G1 T        3 POOLXP050002 CICSUSER TESTP05  00BA    17
 IYK4Z2G1 T  *     6 COMDDSNC0003 JTILLI1           00BA    18
 DISPLAY ACTIVE REPORT COMPLETE
 DSN9022I : DSNVDT '-DIS THREAD' NORMAL COMPLETION
 DFHDB2301 07/09/98 13:36:36 IYK4Z2G1 DSNC DB2 command complete.