#dli directive

The #dli directive lets you modify the default DL/I calls that EGL generates from I/O keywords. Place the directive in the same line as the EGL code it modifies, as in the following example, and continue onto extra lines as necessary:
get myLocation with #dli{
	GU STSCCST (STQCCNO = :myCustomer.customerNo) 
	   STSCLOC (STQCLNO = :myLocation.locationNo) };

As you may have noticed, the syntax in the above example is not exactly the same as in DL/I. EGL supports a powerful pseudo-DL/I syntax that takes on some of the burden of DL/I formatting for you. For example, EGL converts all names to upper case, adds spaces to names to bring them to eight characters where necessary, and converts EGL relational operators such as "!=" to DL/I equivalents. In addition, EGL allows you to use host variables (variables defined in the host EGL program and not in the DL/I database) in your pseudo-DL/I calls. In the sample code above, the host variables begin with a colon (:). EGL turns all these raw materials into properly formatted DL/I calls at generation time.

Occasions when you might choose to use the #dli directive include the following: You will find specific instructions for a number of these tasks in DL/I-specific tasks.

Related concepts:
DL/I database support
Related reference
get
get next

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