@dli

Use the @dli complex property to specify behaviors for DL/I calls from your program by means of a set-values block.

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.

The @dli complex property contains the following property fields:
callInterface DLICallInterfaceKind
The callInterface property defines aspects of the IMS and DL/I calls that the EGL-generated COBOL program implements in response to EGL statements such as add and get. The best practice is to use AIBTDLI, although use of that setting requires your organization to configure PSBs as appropriate for the AIBTDLI interface.
The values are as follows:
AIBTDLI (the default)
This more recent interface takes advantage of the IMS Application Interface Block (AIB). The interface uses the AIB to access runtime PCBs by name rather than by address. Before you use this interface, make sure that your database administrator has assigned a symbolic name to each of the runtime PCBs; specifically, the programmer must set the PCBNAME parameter in the PSBGEN definition.

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.

CBLTDLI
Access to a PCB with this interface is slightly faster because your program uses an address rather than a PCB name. However, requirements for defining the PSBRecord parts are more strict than with AIBTDLI. More importantly, you must usually pass a PSB record or PCB records to called programs rather than simply relying on a name in a given PCB record in the called program. Aside from handling extra data in a program call, the passing of a PSB record requires that you set the psbParm property of the called program, and the passing of PCB records requires that you set the pcbParms property of the called program. (If you pass both a PSB record and PCB records, the PSB is ignored.)
psb STRING
The psb property identifies the program variable that is based on the PSBRecord that in turn corresponds to the Program Specification Block (runtime PSB) to be used by the program.
For example:
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.

pcbParms STRING[]
As used in a called program that receives PCB records as parameters, the pcbParms property field provides a list of strings that EGL uses to match each parameter (of a PCB record type) with a PCB record in the program PSB record part. If the value of the callInterface property is AIBTDLI, the property has no effect.

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.

Although an empty string is used for each PCB record that is in the PSB record part but is not matched by a parameter, you can avoid specifying the last elements in the array if those elements refer to PCB records that are not matched by a parameter. The following assignment is also valid in the current example:
   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 .

psbParm STRING

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.

The following example shows the psbParm property:
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.

handleHardDLIErrors BOOLEAN
Sets the default value for the vgVar.handleHardDLIErrors system variable. The variable controls whether a program continues to run after a hard error has occurred on a DL/I or database I/O operation in a try block. The default value for the property is YES, which sets the variable to 1.

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."


Feedback