Running IMS application programs

To run IMS application programs, you can enter transactions from an IMS terminal. You also can invoke IMS transactions and commands by using the Db2-supplied stored procedures DSNAIMS or DSNAIMS2.

About this task

Use the DSNAIMS stored procedure to send commands and single-segment transactions. Use the DSNAIMS2 stored procedure to send commands and multi-segment transactions.

Application programs that contain SQL statements run in the message processing program (MPP), the batch message processing (BMP), the Fast Path region, or the IMS batch region.

The program must be link-edited with the IMS language interface module (DFSLI000). It can write to and read from other database management systems using the distributed data facility, in addition to accessing DL/I and Fast Path resources.

Start of changeDb2 checks whether the authorization ID that IMS provides is valid. For message-driven regions, IMS uses the SIGNON-ID or LTERM as the authorization ID. For non-message-driven regions and batch regions, if RACF® or another security package is active, IMS uses the ASXBUSER field or the ASXBUSR8 field. The ASXBUSER field is defined by z/OS as seven characters. The ASXBUSR8 field is defined by z/OS as eight characters. If the ASXBUSER field or the ASXBUSR8 field contains binary zeros or blanks (which indicates that RACF or another security package is not active), IMS uses the PSB name instead. End of change

An IMS terminal operator probably notices few differences between application programs that access Db2 data and programs that access DL/I data because IMS sends no Db2-related messages to a terminal operator. However, your program can signal Db2 error conditions with a message of your choice. For example, at its first SQL statement, a program receives an SQL error code if the resources that are to run the program are not available or if the operator is not authorized to use the resources. The program can interpret the code and issue an appropriate message to the operator.

You can run batch DL/I jobs to access Db2 resources; Db2-DL/I batch support uses the IMS attachment facility.