Using the Information Management System (IMS)

This topic explains how the Information Management System (IMS) and z/OS® XL C/C++ coordinate error handling, and describes the limitations to using IMS with z/OS XL C/C++.

z/OS XL C/C++ provides the ctdli() C library function to invoke IMS facilities (see z/OS C/C++ Runtime Library Reference for more information).

You can also invoke IMS facilities with the callable service CEETDLI which is provided by the z/OS Language Environment®. The CEETDLI interface performs essentially the same functions as ctdli(), but it offers some advantages, particularly if you plan to run an ILC application in IMS. If you use the CEETDLI interface instead of ctdli(), condition handling is improved because of the coordination between z/OS Language Environment and IMS condition handling facilities. For complete information on the CEETDLI interface, see z/OS Language Environment Programming Guide.

To use IMS from z/OS XL C/C++, you must keep the following in mind:
  • The file <ims.h> must be included in the program.
  • PLIST(OS) and TARGET(IMS) must be used to compile IMS z/OS XL C/C++ application programs. PLIST(OS) establishes the correct parameter list format when invoked under IMS, and TARGET(IMS) establishes the correct operating environment. The descriptions that follow use the compile-time options. The compile-time option PLIST(OS) can alternatively be specified using #pragma runopts(PLIST(OS)).
  • TARGET(IMS) is mandatory, as it establishes the correct operating environment. PLIST(OS) must also be used if the program is the initial main() program called under IMS. Programs in nested enclaves do not need to be compiled with PLIST(OS).
  • The argument count (argc) will be set to one (1), and the first element in the argument vector (argv[0]) will contain a NULL string when compiled with z/OS XL C compiler and the deprecated #pragma runopts(PLIST(IMS)) is specified in the source. Otherwise, the argument vector will contain the name of the program.
  • IMS provides a language interface module (DFSLI000) that gives a common interface to IMS and DL/I. This module must be link-edited with the application program.

The rest of this topic is based on the assumption that you are using the ctdli() interface.

Notes:
  1. AMODE 64 applications are not supported in an IMS environment.
  2. As of V1R2, a non-XPLINK Standard C++ Library DLL allows support for the Standard C++ Library in the IMS subsystem. For further information, see Binding z/OS XL C/C++ programs in z/OS XL C/C++ User's Guide.
  3. XPLINK applications are supported under the IMS environment.