You must include this property for any program that does DL/I database I/O or that you plan to generate for the IMS/VS or IMS™ BMP target platform.
In EGL, you identify the name by setting the PCBName property of the PCB record. The default for that property is the name of the record.
program Prog1 type basicProgram
{ @DLI { psb = "myPSB" }}
// declare variable based on PSBRecord definition
myPSB CustomerPSBRecord;
The PSBRecord provides the database hierarchy information that EGL uses when creating default SSAs when you use implicit DL/I database I/O. In addition, for CICS®, the PSBRecord provides the default PSB that EGL schedules when the first DL/I database I/O occurs.
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 PSBRecordPart 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 Prog2 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 PSBRecordPart;
If you specify the pcbParms and psbParm properties, the PCB-specific addresses in the former override the equivalent addresses in the latter.
pcbParms = ["", "DB_PCB_parm", "", "GSAM_PCB_parm"]
If you later add a PCB record to the PSB record part, you can avoid an error in array-element positioning by including (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 represent the same area of memory and are counted only once as you construct the array for pcbParms .
EGL stores PSB information in the dliLib.psbData system variable, which is a 12-byte area containing the name and address for accessing a runtime PSB. EGL provides a predefined record named PSBDataRecord that provides the field structure for the 12-byte area. If the value of the callInterface property is CBLTDLI and you need to receive the entire PSB as a parameter in a called program, use the psbParm property to indicate which of the program parameters contains the PSB information. Use the PSBDataRecord as the type definition for this parameter.
program Prog3 type basicProgram
( psbData PSBDataRecord ) // parameter to receive the PSB
{ @DLI { psb = "myPSB", psbParm = "psbData",
callInterface = CBLTDLI
}
}
// declare variable based on PSBRecord definition
myPSB CustomerPSBRecord;
When the EGL program is called, EGL automatically assigns the information from the parameter identified by the psbParm property to the dliLib.psbData system variable.
If you specify the pcbParms and psbParm properties, the PCB-specific addresses in the former override the equivalent addresses in the latter.
Code that was migrated from VisualAge® Generator might not work as before unless you set handleHardDLIErrors to NO, which sets the variable to 0.
For details, see "Exception handling."