The DSN command and its subcommands

DSN is the DB2® command processor and executes as a TSO command processor.


All of the DSN subcommands, except SPUFI, run under DSN in either the foreground or background, and all, except END, also run under DB2 Interactive (DB2I). SPUFI runs only in the foreground under ISPF.

ABEND (DSN) The DSN subcommand ABEND causes the DSN session to terminate with abend completion code X'04E' and reason code of X'00C50101'.
Important: Start of changeThe ABEND subcommand is used for diagnostic purposes only, and is intended to be used only under the direction of IBM® Software Support. Use it only when diagnosing a problem with DSN or DB2.End of change
BIND PACKAGE (DSN) The DSN subcommand BIND PACKAGE builds an application package. DB2 records the description of the package in the catalog tables and saves the prepared package in the directory.
BIND PLAN (DSN) The DSN subcommand BIND PLAN builds an application plan. All DB2 programs require an application plan to allocate DB2 resources and support SQL requests made at run time.
BIND QUERY (DSN) The DSN subcommand BIND QUERY reads the statement text, default schema, and a set of bind options from every row of DSN_USERQUERY_TABLE, and information from correlated EXPLAIN table rows.Start of change When LOOKUP(NO) is in effect, DB2 inserts the pertinent data into certain catalog tables.End of change
DSN (TSO) The TSO command DSN starts a DSN session.
END (DSN) The DSN subcommand END is used to end the DSN session and return to TSO.
FREE PACKAGE (DSN) The DSN subcommand FREE PACKAGE can be used to delete a specific version of a package, all versions of a package, or whole collections of packages.
FREE PLAN (DSN) The DSN subcommand FREE PLAN deletes application plans from DB2.
FREE QUERY (DSN) The DSN subcommand FREE QUERY removes from certain catalog tables for one or more queries. If any of the specified queries are in the dynamic statement cache, FREE QUERY purges them from the dynamic statement cache.
DCLGEN (DECLARATIONS GENERATOR) (DSN) The declarations generator (DCLGEN) produces an SQL DECLARE TABLE statement and a COBOL, PL/I, or C data declaration for a table or a view named in the catalog.
REBIND PACKAGE (DSN) The DSN subcommand REBIND PACKAGE rebinds an application package when you make changes that affect the package, but have not changed the SQL statements in the program.
REBIND PLAN (DSN) Start of changeThe DSN subcommand REBIND PLAN rebinds an application plan when you make changes to the attributes of the plan, such as the package list.End of change
REBIND TRIGGER PACKAGE (DSN) The DSN subcommand REBIND TRIGGER PACKAGE rebinds a package that was created when DB2 executed a CREATE TRIGGER statement.
RUN (DSN) The DSN subcommand RUN executes an application program, which can contain SQL statements.
SPUFI (DSN) The DSN subcommand SPUFI executes the SQL processor using file input.