IDMS ZREADY Exit (MVS Only)

You can create a program named ZREADY using standard IBM calling conventions and link-edit it to the Data Adapter IDMSR module (member IDMSR in the 'prefix.IDMS.LOAD' data set).

When a user executes a FOCUS TABLE request against an IDMS database, the IDMS Data Adapter calls the ZREADY exit before issuing an IDMS READY command.

An example of a useful user written program is one that resolves conflicts between FOCUS users who have access to IDMS databases through the IDMS Data Adapter and maintenance jobs which require exclusive control of their IDMS areas. Often such jobs cannot be initiated because they are waiting for FOCUS users to finish processing. Even though a single FOCUS request may only take a short time, new requests might be started so often that required areas may not become free for a long time. This ZREADY exit provides a way to inhibit new FOCUS requests, and also to force cancellation of active requests if they do not finish within a prescribed time.

The IDMS Data Adapter calls the ZREADY exit for each FOCUS TABLE request against an IDMS database, once for each area containing fields referenced in the FOCUS request. This gives the user exit an opportunity to determine whether or not the IDMS Data Adapter should READY the area in question, and if so, to retain this fact for possible subsequent action. If ZREADY indicates that the READY cannot be issued because you are not authorized to access that data, the Data Adapter informs the FOCUS user and terminates that particular request without retrieving any data, even if the areas were already readied. After this, it ends its contact with IDMS by issuing a FINISH command. The FOCUS session itself is not ended; the user is free to try to access other IDMS areas.

Call ZREADY with the following parameters:

SUBSCHEMA   PIC X(08)
AREANAME PIC X(32)
DBNAME PIC X(08)
NODE PIC X(08)
DICTNAME PIC X(08)
DICTNODE PIC X(08)
STATUS PIC X(04)

On return of a non-zero STATUS code, the user receives the following error message:

(FOC4382) READY INHIBITED BY USER EXIT ZREADY FOR AREA: areaname

The following JCL, member ZREADY in the 'prefix.IDMS.DATA' PDS, can be used to link edit the ZREADY user written program.

//LINK     EXEC PGM=IEWL,
// PARM='LET,NCAL,SIZE=(1024K),LIST'
//OBJLIB DD DSN=prefix.ZREADY.OBJLIB,DISP=SHR
//LOAD DD DSN=prefix.IDMS.LOAD,DISP=SHR
//SYSLMOD DD DSN=prefix.OUTPUT.LOADLIB,DISP=SHR
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(10,1))
//SYSPRINT DD SYSOUT=*
//SYSLIN DD *
INCLUDE OBJLIB(ZREADY)
INCLUDE MAINTAIN(IDMSR)
INCLUDE LOAD(IDMSR)
NAME IDMSR(R)
/*
//

where:

prefix.ZREADY.OBJLIB
Is the PDS containing ZREADY object code.

prefix.IDMS.DATA
Is the PDS containing the Data Adapter source library.

prefix.IDMS.LOAD
Is the PDS containing the IDMSR load module.

prefix.OUTPUT.LOADLIB
Is the PDS to contain the new IDMSR load module.

Information Builders