The global work area

When you enable an exit program, you can ask CICS® to provide a global work area for the exit program. An exit program can have its own global work area, or it can share a work area that is owned by another exit program.

When you issue the ENABLE PROGRAM command to define the exit, you can specify the GALENGTH and GALOCATION options to make CICS provide a global work area for the exit program. GALENGTH specifies the length of the global work area in bytes, and GALOCATION specifies whether it is in 24-bit storage or 31-bit storage. Alternatively, you can specify the GAENTRYNAME option to name another currently enabled user exit, and your exit program shares the global work area that CICS has already provided for the named exit.

The global work area is associated with the exit program rather than with the exit point. For ease of problem determination, the global work area should be shared only by exit programs that are invoked from the same management module or domain. The address and length of the global work area are addressed by parameters UEPGAA and UEPGAL of the DFHUEPAR parameter list, which is described in DFHUEPAR standard parameters. If a user exit program does not own a global work area, UEPGAA is set to zero.

Application programs can communicate with user exit programs that use or share the same global work area. The application program uses the EXEC CICS EXTRACT EXIT command to obtain the address and length of the global work area.

A work area is freed only when all of the exit programs that use it are disabled. For examples of how to use a global work area, see the sample global user exit programs, which are listed in Global user exit foundation samples.