The program property @DLI allows you to specify behaviors for your program's DL/I calls by means of a set-value block. When you include this property in a program, EGL can access details about your most recent call to a DL/I database. For more information, see DLIVar.
In environments other than CICS®, you cannot change the runtime PSB that is the first one scheduled in the run unit.
As shown in the next example, the position of strings in the array must match the position of PCB records in the program PSB record part, and each non-empty string in the array must be identical to the name of a PCB record in the list of program parameters.
Record myPSBRecordPart type PSBRecord {defaultPSBName = "ibmPSB"} // details of the following records are omitted in this example ioPCB IO_PCBRecord; dbPCB DB_PCBRecord; // passed in db2PCB DB_PCBRecord; gsamPCB GSAM_PCBRecord; // passed in gsam2PCB GSAM_PCBRecord; end program PrintCatalog type basicProgram (GSAM_PCB_parm GSAM_PCBRecord, DB_PCB_parm DB_PCBRecord) { @DLI{ psb = "myPSB", callInterface = CBLTDLI, pcbParms = ["", "DB_PCB_parm", "", "GSAM_PCB_parm", ""] } } myPSB myPSBRecordPart;
If you specify properties pcbParms and psbParm, the PCB-specific addresses in the former override the equivalent addresses in the latter.
pcbParms = ["", "DB_PCB_parm", "", "GSAM_PCB_parm"]
To avoid an error in array-element positioning if you later add a PCB record to the PSB record part, include (without exception) an array element for each PCB record in the PSB record part.
If a PCB record in the PSB record part is a redefine of another PCB record in that part, the original record and the redefined record represents the same area of memory and are counted only once as you construct the array for pcbParms.
Record PSBDataRecord psbName char(8); psbRef int; end
Program Prog1 ( psbData PSBDataRecord ) { @DLI (psbParm = "psbData" ) }
If you specify properties pcbParms and psbParm, the PCB-specific addresses in the former override the equivalent addresses in the latter.
The name and address received into the program are assigned automatically to the system variable DLILib.psbData.
Code that was migrated from VisualAge® Generator may not work as before unless you set handleHardDLIErrors to no, which sets the variable to 0.
For details, see DLIVar and Exception handling.
Related concepts
DL/I database support
Related reference
DLIVar
Exception handling
PCB record part properties