IMS versions 3.1 and above offer the DBCTL (Database Control) facility for accessing online IMS databases in MVS. DBCTL provides a number of security, efficiency, and application control enhancements and is easy to implement.
This section includes the following topics:
Note: DBCTL is not available for accessing IMS databases from CMS.
The advantages of using DBCTL include the following:
You also have the option of creating Access Files that identify the appropriate PSB for each Master File (see Chapter 3, Creating FOCUS Descriptions). When you have Access Files, you do not have to issue a command to select a PSB, so the selection is transparent to your application.
DBCTL must have been installed as described in Installation Instructions.
The following diagram illustrates the relationship between FOCUS, the Interface, and IMS in the DBCTL environment:
Address Space |
Contains |
|
|
|
To invoke the Interface interactively within the DBCTL environment, edit the following CLIST to conform to your site's standards. In addition, add the IMS.RESLIB and the name of the PDS that contains the DRA Startup Table (load module DFSPZPxx, described in Installation Instructions) to the STEPLIB allocation in your TSO logon procedure. Note that the CLIST allocates the entire FOCPSB data set, not just one member:
PROC 0
CONTROL NOMSG
FREE DDNAME(USERLIB ERRORS MASTER ACCESS FOCEXEC FOCPSB FOCLIB)
ALLOC F(ERRORS) DA('prefix.ERRORS.DATA') SHR REUSE
ALLOC F(USERLIB) DA('prefix.IMS.LOAD' +
'prefix.FUSELIB.LOAD') SHR REUSE
ALLOC F(MASTER) DA('prefix.MASTER.DATA') SHR REUSE
ALLOC F(ACCESS) DA('prefix.ACCESS.DATA') SHR REUSE
ALLOC F(FOCEXEC) DA('prefix.FOCEXEC.DATA') SHR REUSE
ALLOC F(FOCPSB) DA('prefix.FOCPSB.DATA') SHR REUSE
ALLOC F(FOCLIB) DA('prefix.FOCLIB.LOAD') SHR REUSE
CALL 'prefix.FOCLIB.LOAD(FOCUS)'
where:
You can omit the allocation for ddname ACCESS if you select the psbname with the IMS SET PSB command, not in an Access File (see Implementing DBCTL).
To invoke the Interface as a batch job, submit the following JCL after editing it to conform to your site's standards and adding a JOB card. Note that the JCL allocates the entire FOCPSB dataset, not just one member:
//FOCDBCTL EXEC PGM=FOCUS,REGION=nn
//STEPLIB DD DSN=prefix.FOCLIB.LOAD,DISP=SHR
// DD DSN=IMS.RESLIB,DISP=SHR
// DD DSN=prefix.IMS.LOAD,DISP=SHR
// DD DSN=prefix.FUSELIB.LOAD,DISP=SHR
//ERRORS DD DSN=prefix.ERRORS.DATA,DISP=SHR
//FOCPSB DD DSN=prefix.FOCPSB.DATA,DISP=SHR
//FOCEXEC DD DSN=prefix.FOCEXEC.DATA,DISP=SHR
//MASTER DD DSN=prefix.MASTER.DATA,DISP=SHR
//ACCESS DD DSN=prefix.ACCESS.DATA,DISP=SHR
//SYSOUT DD SYSOUT=*
//*FSTRACE DD SYSOUT=*,DCB=BLKSIZE=133
//*FSTRACE4 DD SYSOUT=*,DCB=BLKSIZE=133
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
TSO IMS SET IMSPZP xx
TSO IMS SET DBCTL ON
TSO IMS SET PSB psbname
TABLE FILE ...
.
.
.
END
FIN
/*
//
where:
Note:
To implement the DBCTL environment if you are not running MSO, issue the following commands in the order shown (if you are running MSO, these settings are in your configuration file, described in Installation Instructions):
{MVS|TSO} IMS SET IMSPZP {xx|00}
{MVS|TSO} IMS SET DBCTL ON
where:
Next, if you did not create an Access File to automatically select the PSB for your request (see Chapter 3, Creating FOCUS Descriptions), or to change the selected PSB, issue the following command either from the command line, in the MSOPROF profile, or in a FOCEXEC
{MVS|TSO} IMS SET PSB psbname
where:
(FOC4261) FOCPSB MEMBER NOT FOUND: psbname
Note:
(FOC4295) ACCESS POINTS TO DIFFERENT PSBS IN JOIN
To see the settings in effect at any time during your session, issue the following query command:
{MVS|TSO} IMS SET ?
Release Dependent Interface Features, contains an example of the IMS SET ? query command.
Information Builders |