Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Typed structure qualification

Using the '.' operator
Combinations of arrays and typed structures or unions
Using handles

You reference a member of a typed structure using the . operator or a handle with the => operator. Unlike names in a typical untyped structure, the names in a typed structure form their own "name space" and cannot be referenced by themselves. For example, given the following declares and definitions

dcl 1 A,
2 B fixed bin,
2 C fixed bin;

define structure
1 X,
2 Y fixed bin,
2 Z fixed bin;
dcl S type X;

B is a valid reference, but Y is not.

Type names are also in a separate name space from declared names. Therefore, you can use the name of a type as a variable name also.

  define alias Hps pointer;
  declare Hps type Hps;

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)