@DLI

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.

The @DLI property contains the following 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 like add and get. It is recommended that you use AIBTDLI, although use of that setting requires your organization to configure PSBs as apppropriate 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 AIB allows you to access runtime PCBs by name rather than by address. Before you use this interface, however, make sure that the system programmer in your organization has assigned a symbolic name to each of the runtime PCBs; specifically, the programmer must set the PCBNAME parameter in the PSBGEN definition.

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 is slightly faster because your program uses an address rather than a PCB name. However, requirements for defining the PSBRecord parts are greater than with AIBTDLI, and more important, you usually must 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 called program's psbParm property, and the passing of PCB records requires that you set the called program's pcbParms property. (If you pass both a PSB record and PCB records, the PSB is ignored.)
psb STRING
The psb property identifies the PSB record that refers to the Program Specification Block (runtime PSB) to be scheduled with the program. The record must be in scope.

In environments other than CICS®, you cannot change the runtime PSB that is the first one scheduled in the run unit.

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

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.

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

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.

psbParm STRING
If non-EGL program calls an EGL program and includes a 12-byte name and address for accessing a runtime PSB, the called program property psbParm identifies the parameter that provides the name and address.
The parameter is of type PSBDataRecord, which is structured as follows:
  Record PSBDataRecord
    psbName char(8);
    psbRef int;
  end
Here is an example of the property in use:
  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.

handleHardDLIErrors BOOLEAN
Sets the default value for the system variable VGVar.handleHardDLIErrors. The variable controls whether a program continues to run after a hard error has occurred on a DL/I or IMS 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 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

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.