Previous Topic: Calling Non-Ideal Subprograms that Access CA Datacom/DBNext Topic: Guidelines for CICS Programs


Guidelines for Batch Programs

To indicate that the non-Ideal subprogram is mainline and CA Datacom/DB is a subroutine of the program, link edit the non-Ideal subprogram with ENTRY pgm-name.

In the User Requirements Table (URT) for the non-Ideal subprogram, specify OPEN=USER in the DBURINF macro.

If you are not sharing the URT, include OPEN and CLOSE logic in the non-Ideal subprogram. Execute the OPEN and CLOSE logic in the non-Ideal subprogram only once during the application run to reduce overhead. You can do this by including a parameter on the CALL statement in the CA Ideal program that invokes the non-Ideal subprogram. This parameter indicates whether to open, close, or update the tables in the non-Ideal subprogram. The call using the OPEN parameter is done at the beginning of the CA Ideal program. The CALL using CLOSE executes upon ending the CA Ideal program.

This type of logic makes it very easy to adapt existing COBOL programs to use with CA Ideal, although it is only one example of how you can control the OPEN and CLOSE logic.

Using IDENTIFY in z/OS Batch

A CA Ideal batch job must specify PARM='IDENTIFY' in order for the non-Ideal program to use the same DB URT and therefore a single DB task for the CA Ideal batch job.

The non-Ideal subprogram must be linked AMODE(31) and must call DBNTRY dynamically (compile option DYNAM). The CA Ideal calling program must access at least one CA Datacom/DB dataview. The SET RUN URT statement for the batch RUN must include the table to be accessed in the non-Ideal subprogram.

The following is sample JCL for the CA Ideal batch execution:

//xxxx     JOB xxxxxx
//PROC JCLLIB  ORDER=xxxx.proclib
//xxxx     EXEC idlbatch,PARM='IDENTIFY'
//SYSIN DD *
SEL SYS xxx
SET RUN URT dburtxxx
RUN idlpgmx