Issuing commands to Db2 by using the DSNC transaction

The DSNC transaction allows you to enter Db2 commands from CICS®.

BMS paging support can be used to support the screen 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 System initialization parameter descriptions and summary.

Syntax

Read syntax diagramSkip visual syntax diagramDSNC destinationdb2-command
Parameters
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.

Environment

This command can be issued only from a CICS terminal.

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 more information, see Alternative transaction definitions supplied in sample group DFH$DB2.

For example, if you have installed the -DIS transaction definition, DSNC -DIS THD(*) can be abbreviated to -DIS THD(*).

Authorization

If you need to issue Db2 commands through DSNC, the following authorization is required:
  • Db2 privileges
  • CICS TS transaction security authorisation to run the DSNC transaction

For more information about CICS security, see Security in a CICS Db2 environment.

Example

To display threads for a CICS region with applid IYK4Z2G1, issue the following command from a CICS terminal:
DSNC -DISPLAY THREAD(IYK4Z2G1)
Figure 1 shows a sample output from this command.
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/** 13:36:36 IYK4Z2G1 DSNC DB2 command complete.