DSN command processor
The DSN command processor is a TSO command processor that runs in TSO foreground or under TSO in a JES-initiated batch environment.
It uses the TSO attachment facility to access Db2. The DSN command processor provides an alternative method for running programs that access Db2 in a TSO environment.
When you run an application by using the DSN command processor, that application can run in a trusted connection if Db2 finds a matching trusted context.
- Using the declarations generator (DCLGEN)
- Running the BIND, REBIND, and FREE subcommands on Db2 plans and packages for your program
- Using SPUFI (SQL Processor Using File Input) to test some of the SQL functions in the program
The DSN command processor runs with the TSO terminal monitor program (TMP). Because the TMP runs in either foreground or background, DSN applications run interactively or as batch jobs.
- Automatic connection to Db2
- Attention key support
- Translation of return codes into error messages
Limitations of the DSN command processor
When using DSN services, your application runs under the control of DSN. Because TSO executes the ATTACH macro to start DSN, and DSN executes the ATTACH macro to start a part of itself, your application gains control that is two task levels below TSO.
- If Db2 is down, your application cannot begin to run.
- If Db2 terminates, your application also terminates.
- An application can use only one plan.
If these limitations are too severe, consider having your application use the call attachment facility or Resource Recovery Services attachment facility. For more information about these attachment facilities, see Call attachment facility and Resource Recovery Services attachment facility.
DSN return code processing
At the end of a DSN session, register 15 contains the highest value that is placed there by any DSN subcommand that is used in the session or by any program that is run by the RUN subcommand. Your run time environment might format that value as a return code. However, the value does not originate in DSN.