HP 3000 Manuals

##getent [ VIRTUOSO CODE GENERATOR Reference Manual ] MPE/iX 5.0 Documentation


VIRTUOSO CODE GENERATOR Reference Manual

#getent 

Retrieves an entity's attributes from the System Dictionary

Syntax 

     #getent entity-type="entity-name" attr=(attr1 attr2 ...) 

Keywords 

entity-type      is the entity-type of the System Dictionary entity to be
                 retrieved.

entity-name      is the name of the entity occurrence that is to be
                 retrieved from the System Dictionary.

attr1...         are the names of the entity's attributes that are to be
                 retrieved.  This can be a single attribute or an
                 attribute list as shown in the syntax.  Use blanks or
                 commas to separate attributes.

Description 

The #getent construct retrieves attributes for the specified System
Dictionary entity.  The list of attributes is optional.  If omitted, the
generator retrieves all of the attributes for the entity.  However,
generation time can be significantly shortened by specifying on those
attributes which are needed.  Variable length attributes are treated
exactly like other entity attributes.

Retrieval for the #getent construct is different from the #getrel and
#for constructs, as these constructs do not retrieve attributes unless
the attr keyword is included.  However, the #getrel and #for constructs
are typically used to retrieve relationship occurrences and not attribute
values for those relationships.

The value for the NUMENTS keyword is set to the number of entities that
are retrieved.  If there is no occurrence of an entity for the specified
entity-type, the NUMENTS keyword is set to 0.

Limitations. 

   1.  The maximum number of attributes that can be retrieved is as
       follow

        *  64 - if attr = (ALL)

        *  20 - if the attributes are listed individually, i.e., ATTR=
           (attr1,attr2,...)

When retrieving a variable length attribute, the maximum length of the
attribute is restricted to 1023 bytes.  If the attribute value is longer
than this limit, truncation occurs and you receive a warning message.

Examples 

EXAMPLE 1

     #getent element="PRODUCT-NO" attr=(byte-length element-type)

The above statement retrieves the entity PRODUCT-NO of entity-type
ELEMENT. The attributes retrieved are its byte-length and its type.  The
values of the attributes can be included in the text by referring to
!byte-length or !element-type.

EXAMPLE 2

     #let module="ORDENT"
       .
       .
     #getent module="!module" attr=(module-type description)

     IDENTIFICATION DIVISION.
     PROGRAM-ID. !module.
     DESCRIPTION.

     #description comment="!description"
       .
       .

The construct #getent retrieves attributes for the module ORDENT. The
module-type and description are the attributes that are retrieved.  Note
that although description is a variable length attribute, no special
syntax or handling is require The attribute description is then
referenced in the #description construct.  The generated output is:

     IDENTIFICATION DIVISION.
     PROGRAM ID. ORDENT.
     DESCRIPTION.

     *  This program opens databases and forms files, displays and
     *  reads from a screen, and updates the detail data set based
     *  on input from the user.



MPE/iX 5.0 Documentation