Previous Topic: 18-Byte Communications BlocksNext Topic: Online Debugger Syntax


Optional Online COBOL Functionality

Several APARs have been written that affect the performance and/or functionality of COBOL programs in the online CA IDMS/DC system. This appendix discusses the effects of the various APARs.

Note: This discussion applies only to online programs running in a DC/UCF region. It does not apply to batch programs or to programs running in a CICS region or under control of another TP monitor, even if such programs access an IDMS database via LOCAL or CV mode.

This section contains the following topics:

COBOL II and LE COBOL Task Management

PSW Program Mask Settings

Loading VS COBOL Programs into XA Storage

COBOL II and LE COBOL Task Management

Several optional APARs have to do with the management of a COBOL II task thread or a LE COBOL process(environment) and enclave. To better understand the concept of a COBOL task thread, first consider a batch COBOL job in which IDMS is not involved. When a COBOL II program is first invoked, the COBOL support code causes the load of a small program called IGZCTCO. As the COBOL II runtime system is built, control information is placed in the copy of IGZCTCO that has been loaded into the address space. If the top level program (call it program A) issues a CALL IDENTIFIER to a second COBOL program (call it program B), the COBOL II support code finds the existing copy of IGZCTCO. Program B is entered using the same COBOL II environment. The first time program B is entered, its WORKING STORAGE is initialized according to any VALUE clauses coded.

If program B does a GOBACK to program A and then program A issues a second CALL IDENTIFIER to program B, program B is normally entered with the same WORKING STORAGE values left from the previous invocation. The VALUE clauses are not reinitialized.

In Language Environment for z/OS, the concepts of the LE process and enclave are roughly analogous to the COBOL II task thread. See IBM documentation for a more complete discussion of these concepts.

Now let us return to the discussion of COBOL II in an online DC/UCF system. When COBOL II support was first introduced for DC/UCF, every invocation of a COBOL program via a TRANSFER RETURN from another COBOL program caused a new IGZCTCO to be loaded. The COBOL II task thread was recreated. Thus if Task A invokes COBOL II program X, which does a TRANSFER CONTROL ten times to program Y, the COBOL II task thread was built eleven times -- once for program X and ten times for program Y. Moreover, if program Y terminated with a DC RETURN instead of a GOBACK, all the storage associated with each invocation was preserved until task termination. This causes serious overhead of CPU and potentially of storage utilization.

To reduce the overhead of constantly creating new COBOL II environments, the DC/UCF COBOL II support was modified to load only one copy of IGZCTCO per task. Using this method, if main program X issues a TRANSFER CONTROL ten times to program Y, the COBOL II environment is built only once. The drawback is that certain functionality is changed. In particular, WORKING STORAGE is not reinitialized each time program Y is entered. Also, recursive TRANSFER CONTROL (Program X issues TRANSFER CONTROL TO X) is not allowed. Since some existing applications depended on those features, optional APARs were developed to allow use of one method or the other. Unfortunately, the DC/UCF default methodology changed from release to release and sometimes within one release.

Note: IGZCTCO is handled differently in DC/UCF systems that are operating with an IBM Language Environment runtime system (such as LE for z/OS). COBOL II programs can be used in these systems, but prior to release 14.1, a new IGZCTCO was used for every TRANSFER to a COBOL II program.

Beginning with release 14.1, online COBOL II programs in an LE runtime environment will run most efficiently if RHDCLEFE is defined in the DC/UCF Sysgen as documented in the release 14.1 Features Guide. This gives functionality similar to that documented for the "single IGZCTCO" method shown below. In that case, the COBOL II program is handled as though it were compiled under LE COBOL.

The following table describes how to utilize each of the two methods for the latest maintenance of all currently supported DC/UCF releases. This table supercedes the documentation in any previous APARs or PDCs. Note that the table is divided into several sections depending on the COBOL compiler level and the runtime level.

Part 1

This part of the table contains programs compiled under COBOL II and using COBOL II runtime libraries.

Release

Method 1 (Most CPU efficient) Use single IGZCTCO per task

Method 2 (Special functionality) Use new IGZCTCO each TRANSFER

10.21PS

Default

Apply optional APAR 88-06-1105

12.01

Default (see note below)

Apply optional APAR LS12053.

14.0 and later

Turn on optional bit 49 in RHDCOPTF.

Default.

Note: In release 12.01, prior to maintenance level 9607, it is necessary to apply APAR GO97250 to obtain the default condition shown above. With application of GO97250, optional APAR GS19348 is obsolete.

Note: Optional bit 49 is not valid in a LE/370 runtime environment.

Part 2

This part of the table contains programs compiled under COBOL II and using LE runtime libraries. RHDCLEFE is not in use.

Release

Method 1 (Most CPU efficient) Use single IGZCTCO per task

Method 2 (Special functionality) Use new IGZCTCO each TRANSFER

10.21PS and later

Not available

Default

Part 3

This part of the table contains programs compiled under COBOL II and using LE runtime libraries. RHDCLEFE is in use.

Release

Method 1 (Most CPU efficient) Reuse same process/enclave

Method 2 (Special functionality) Use new process/enclave

10.21PS

Not available

Default

12.01

Not available

Default

14.0

Not available

Default.

14.1 and later

Default

Optional bit 196.

Part 4

This part of the table contains programs compiled under LE COBOL and using LE runtime libraries.

Release

Method 1 (Most CPU efficient) Reuse same process/enclave (see first note below)

Method 2 (Special functionality) Use new process/enclave (see first note below)

10.21PS

Not available

Default

12.01

Not available

Default

14.0

Default

Optional bit 196. (see second note below)

14.1 and later

Default

Optional bit 196.

Note: When using RHDCLEFE with release 14.1 and later, the default is to preserve both the LE environment (process) and the LE enclave when invoking the same program multiple times in the same DC task. When not using RHDCLEFE, the environment is preserved for LE COBOL programs, but not the enclave.

In release 14.0, prior to maintenance level 9810, it is necessary to apply APAR LS40957 in order for optional bit 196 to have any effect. That APAR is automatically applied at level 9810 and above.

PSW Program Mask Settings

The program mask in the PSW controls whether or not certain arithmetic exceptions will cause a program check or be ignored. If the exception is ignored, significant digits of data may be lost. If the bit is on, the exception causes a program check. If the bit is off, the exception is ignored. The exceptions controlled by the program mask are as follows:

PSW bit

Exception

20

Fixed-point Overflow

21

Decimal overflow

22

Exponent underflow

23

Significance

When the CA IDMS/DC/UCF system is in system mode (i.e., code in the system nucleus is executing), the program mask is always set to B'1110'. This enables a program check for all exceptions except significance exceptions.

A program mask of B'1110' is the default for initial entry into a user mode program. Some high level languages may change the program mask. For example, some versions of COBOL change the mask to B'0000'. The DC default is to honor such a change. The DC system does that by saving the program mask when a user-mode program makes a system request (for example, an OBTAIN or a GET STORAGE). While the request is being processed, the program mask is always set to B'1110'. When the system processing is completed, the program mask is restored before return to the user-mode program which made the request.

The default program mask settings can be modified through the use of options module RHDCOPTF. One option is to force the program mask to be set to B'1110' (the system default) upon return to a user-mode program after a system request as well as upon initial entry to the program. To effect this option, set OPT00253 in RHDCOPTF. This option will cause the default mask to be in effect at all times with one exception. The exception would be during the period after the user-mode program changes the mask until the next time it makes a system request. Note that this exception does not apply to COBOL II or LE COBOL programs. The COBOL run time code will always make several requests to the DC system for storage or other resources before the actual application code is entered. This assures that the default mask will be in effect when the application code is executed.

If OPT00253 is set, option bits 148 and 184 through 188 (described below) ignored.

The value of the program mask upon initial entry to a user-mode program can also be modified as described below:

Loading VS COBOL Programs into XA Storage

VS COBOL II and LE COBOL programs can and normally should be linked with AMODE 31 and RMODE ANY. Old-style VS COBOL programs, which run in batch, must run with AMODE 24 and RMODE 24. However, when running online VS COBOL programs in a DC/UCF region, it is permissible to run with AMODE 31 and RMODE 24. This is the normal recommended AMODE/RMODE setting for online VS COBOL program. This allows the WORKING STORAGE for VS COBOL programs to be allocated in XA storage. Since multiple copies of WORKING STORAGE may be allocated simultaneously (when multiple tasks are running that use the same program), this feature considerably reduces the amount of below-the-line storage required.

Some sites have a large number of COBOL programs and may want to link VS COBOL programs with AMODE 31 and RMODE ANY. This allows the programs to be loaded into the 31-bit (above-the-line) PROGRAM POOL. Caution should be used before utilizing this feature. If a program that is loaded above the line issues a COBOL verb that causes an illegal SVC to be issued or if the program is compiled with illegal compile options, the entire DC/UCF region may be abended. In some cases, the entire operating system may be abended. Illegal COBOL verbs and compile options are listed in Chapter 2:.

If online VS COBOL programs are to be linked RMODE(ANY) and run under Release 12.01 or earlier, an optional APAR must be applied. No optional APAR is required for release 14.0 and above, but the cautions listed above must be observed. The optional APARs are as follows:

Release

APAR

10.21PS (MVS)

90-09-1003

10.21PS (VSE)

Not available

12.01 (MVS)

CS82390

12.01 (VSE)

GS53516