Overview of EGL properties

Most EGL parts have a set of properties that are used to create appropriate output at generation time. You set those properties in a set-value block, which is an area of code that is shown later in the current topic and is described more fully in Set-value blocks.

The set of valid properties varies by context:

A property cannot be accessed at run time. When you create variables that are based on an SQL record part, for example, the logic that you write cannot retrieve or change the names assigned to the tableNames property, which identifies the SQL tables that are accessed by the record. Even if you override a property value in a variable declaration, the value that you specify at development time cannot be changed by your logic.

The lack of runtime access to a property value means that when you assign the content of a variable or use the variable as an argument, the property value is not transferred along with the content. If you copy data from one SQL record to another, for example, no change is made to the specification of which SQL tables are accessed by the destination record. Similarly, when you pass an SQL record to an EGL function, the parameter receives field content, but retains the SQL-table specifications that were assigned at development time.

Predefined EGL parts such as ConsoleField may include both properties and predefined fields. Unlike properties, the fields (sometimes called attributes) are available at run time. The logic that you write can read the field value and in many cases can change the field value.

You access predefined fields as you access the fields that you define. You can use a set-value block to set fields as well as to set properties.
Note: A restriction applies to fields in fixed structures. You can use set-value blocks to assign the values of the primitive field-level properties, but not to set the values of the fields themselves.

If you make multiple assignments to the same field or property in a set-value block, the last assignment takes effect. That rule also applies to fields of complex properties, which are described in the next section.

Complex properties

In some cases you specify generation characteristics by assigning complex properties, each composed of a set of property fields. You might use syntax like the following, for example, to declare an EGL service and to define the complex property @EGLBinding, which contains the details needed to provide access to the service:
  myService myServicePart 
  { @EGLBinding
    {commType="DIRECT",
     serviceName="myService",
     servicePackage="my.useful.service"}
  }

Neither a complex property nor its fields can be accessed at run time.

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