IMS - IBM Mainframe

Although much of the coding of a VS COBOL II program will be the same when running under IMS, you should be aware of the following recommendations and restrictions.

Recommended Compiler Options

It is recommended that the RENT and RES compiler options be used for optimum performance in the IMS environment. By using these options, you can preload programs and library routines. IMS allows COBOL programs to be preloaded, that is, to remain resident in storage. This can boost performance, since subsequent requests for the program can be handled faster when the program is already inside the processor (rather than fetched from a library each time it is needed).

VS COBOL II allows programs to be preloaded or not with the same set of compiler options, namely the RENT and RES options. A program that is to be used in both apreloaded and a non-preloaded way (or used preloaded exclusively) must be reentrant and use the COBOL Library Management Facility. In addition, the RES option provides you with the opportunity to tune the VS COBOL II system for better performance.

Running Above the 16-Megabyte Line

To run above the 16-megabyte line, your application program must be compiled with RENT, RES and either DATA(24) or DATA(31), depending on your IMS environment. If you are using a release of IMS prior to IMS/ESA Version 3, the data for IMS application programs must reside below the 16-megabyte line, and you must specify DATA(24) to use IMS services. DATA (24) ensures that all COBOL data areas are below the 16-megabyte line and will be addressable to programs in 24-bit addressing mode.

With IMS/ESA Version 3 and later, the data for IMS application programs can reside above the 16-megabyte line, and you can specify DATA (31) for programs that use IMS services. DATA (31) enables you to use the full 31-bit addressing capabilities of MVS/XA or MVS/ESA.

Recommended Link-Edit Attributes

The link-edit attributes recommended for proper execution of VS COBOL II programs under IMS are:

  • Load modules containing only VS COBOL II RENT programs should be linked RENT.
  • Load modules containing a mixture of VS COBOL II RENT programs and other programs can be linked using the link-edit attribute recommendations related to the other programs.
  • OS/VS COBOL preloaded programs should be linked REUS.
  • OS/VS COBOL non-preloaded programs- should NOT be linked REUS.
  • COBOL library routines must be link-edited properly; that is, the OS/VS COBOL library routines ILBOCOMO and ILBOSRVO should be link-edited with the REUS attribute, and all others with RENT.

Coding Restrictions

Non-IMS I/O statements must not be used in IMS VS COBOL II Message Processing Programs (MPPs). For example, the following are not allowed:

  • READ and WRITE
  • REWRITE
  • OPEN and CLOSE

In addition to the above, ACCEPT, DISPLAY, RECEIVE, SEND, and STOP RUN statements are not allowed in IMS OS/VS COBOL programs.

Mixed VS COBOL II and OS/VS COBOL Applications

In a mixed VS COBOL II and OS/VS COBOL application, it is recommended that the LIBKEEP=YES run-time option be specified, the RENT/RES compiler options be used for VS COBOL II programs, and the RES/NOENDJOB be used for OS/VS COBOL programs. This allows OS/VS COBOL programs to be preloaded or not. If LIBKEEP=NO (which is the default), preloaded OS/VS COBOL programs must have been compiled with NOENDJOB.

If you preload the ILBOCOM library routine, then you must also preload these library routines:

  • ILBOCMM, ILBONTR, and ILBOSRV
  • ILBOACS, ILBOCVB, and ILBOINS. If the INSPECT and/or UNSTRING verbs are used in a RES OS/VS COBOL program.

The OS/VS COBOL NOENDJOB/ENDJOB compiler option produces different results when running with the VS COBOL II library than when running with the OS/VS COBOL library. In a VS COBOL II run-time environment:

  • When non-preloaded OS/VS COBOL subprograms that are compiled with RES and NOENDJOB terminate, the programs and their internal work areas are deleted; their external work areas (storage acquired with a GETMAIN) and library routines remain in dynamic storage. When ENDJOB is used instead of NOENDJOB, there is essentially no difference except that the external work areas and library routines are deleted as well.
  • Because VS COBOL II programs and their resources (all work areas and library routines) are always deleted at termination, the way ENDJOB and NOENDJOB works in a VS COBOL II run­time environment allows both VS COBOL 11 and OS/VS COBOL programs to be treated similarly.
  • In the OS/VS COBOL run-time environment, ENDJOB was the strongly recommended compiler option when executing IMS transactions invoking non-preloaded COBOL programs.

A program remains in last-used state between COBOL transactions only when all the following conditions are true:

  • It is an OS/VS COBOL program compiled with the NOENDJOB option.
  • It has been link-edited with the REUS option.
  • It has been preloaded.
  • It is a dynamically called subprogram or a statically called subprogram that has, itself, been called by a dynamically called subprogram.

If OS/VS COBOL programs using NORES/NOENDJOB are to be used, then the library routine ILBONTR must be preloaded.

In an MVS/XA or MVS/ESA environment, the OS/VS COBOL application programs and the ILBO library routines run below the 16-megabyte line. Dynamic CALLs should be used to communicate between VS COBOL II programs above 16 megabytes and OS/VS COBOL programs below 16 megabytes.

The OS/VS COBOL user will experience performance differences when executing in the VS COBOL II environment (using VS COBOL II run-time libraries). VS COBOL II reconstructs the COBOL environment each time the IMS application main COBOL program is entered.

Each time an application main COBOL program is entered and exited, you incur overhead from the initialization and termination of the COBOL environment. It is recommended that the following VS COBOL II library routines be preloaded to enhance performance:

  • VS COBOL II COBPACKS IGZCPAC and IGZCPCO
  • IGZEINI
  • IGZEPCL
  • IGZEPSU
  • IGZCTCO

For performance reasons, if the RES or DYNAM option is used for OS/VS COBOL programs, the OS/VS COBOL compatibility library routines that are called should be preloaded.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics