To test your DL/I calls, you must first define the database segments and your application's access to those segments. This definition must be done on Micro Focus Workbench if you plan to test your application on the workstation and on IMS/ESA. For more information about setting up your databases to test DL/I calls on the workstation, see MVS Workbench Micro Focus Workbench for MVS Programmers.
For an application to communicate with the database without being aware of the physical location of the data, use database descriptors (DBD) and program specification blocks (PSB).
A DBD describes the content and hierarchical structure of the physical or logical database. DBDs also supply information to IMS to help it locate segments.
A sample DBD follows:
DBD NAME=MYBANKD,ACCESS=(HIDAM,VSAM) DATASET DD1=MYBANKD,DEVICE=3390 SEGM NAME=CUSTOMER,PARENT=0,BYTES=179 FIELD NAME=(ACCTNO,SEQ,U),BYTES=10,START=1,TYPE=C LCHILD NAME=(INDEX,MYBANKI),PTR=INDX SEGM NAME=CHECKING,PARENT=CUSTOMER,BYTES=25 SEGM NAME=CHECKACT,PARENT=CHECKING,BYTES=26 SEGM NAME=SAVING,PARENT=CUSTOMER,BYTES=25 SEGM NAME=SAVACT,PARENT=SAVING,BYTES=26 DBDGEN FINISH END
A PSB specifies the database segments an application can access. PSBs are composed of one or more program control blocks (PCB), because an application can access multiple databases. In addition to including the segments of data an application can access, the PSB also describes the functions an application can perform on the data, such as read only, update, or delete.
TITLE 'PSB FOR IMS TEST CASE 4' PCB TYPE=TP,PCBNAME=ALTPCB1,LTERM=TERM123 PCB TYPE=DB,PCBNAME=BANKPCB1,DBDNAME=MYBANKD,PROCOPT=AP,KEYLEN=10 SENSEG NAME=CUSTOMER,PARENT=0 SENSEG NAME=CHECKING,PARENT=CUSTOMER SENSEG NAME=CHECKACT,PARENT=CHECKING SENSEG NAME=SAVING,PARENT=CUSTOMER SENSEG NAME=SAVACT,PARENT=SAVING PSBGEN LANG=,PSBNAME=PSBBANK4 END