DEFINE ALIAS statement
The DEFINE ALIAS statement specifies a name that can be
used as a synonym for the set of data type attributes you give to
the alias.
 .-,---------.
V |
>>-DEFINE--ALIAS--alias-name----attribute-+--;-----------------><
|
- alias-name
- Specifies the name that can be used wherever the explicit
data type defined by the specified attributes is allowed
- attributes
- The attributes that can be specified are any of the attributes
for variables that can be returned by a function (for example, those
attributes valid in the RETURNS option and attribute). These valid
attributes are listed in Table 8. Therefore, you cannot
specify an alias for an array or a structured attribute list. However,
you can specify an alias for a type that is defined in a DEFINE ORDINAL,
or DEFINE STRUCTURE statement (see DEFINE ORDINAL statement and Defining typed structures and unions), or in another DEFINE ALIAS statement. Also, as
in the RETURNS option and attribute, any string lengths or area
sizes must be restricted expressions.
Missing data attributes are supplied using PL/I defaults.
Example
define alias Name char(31) varying;
define alias Salary fixed dec(7); /* real by default */
define alias Zip char(5) /* nonvarying by default */
Whenever Name is used in a DECLARE statement, it has the attributes char(31) varying.
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)