z/OS Communications Server: CMIP Services and Topology Agent Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Constructed value format

z/OS Communications Server: CMIP Services and Topology Agent Guide
SC27-3646-00

The constructed types, SET, SEQUENCE, SET OF, and SEQUENCE OF and the CHOICE types use constructed value format. In this format, the value of a <label> <value> pair is surrounded by parentheses and contains other <label> <value> pair specifications separated by commas, as is shown in the following ASN.1 definition:
    A ::= SEQUENCE
          {
              a INTEGER,
              b BIT STRING,
              c BOOLEAN
          }
The invoking application program specifies the following across the API:
    (a 12, b 11011011, c TRUE)
To nest constructed data types, use multiple sets of parentheses. Note that the number of parentheses does not correspond directly to the number of braces in the ASN.1. It corresponds to the number of constructed data types that occur. For example, an application program could specify
    (a 12, b (1, 2, 3, 4), c TRUE, d (111, 1101110, 11000))
to be sent to the API to correspond to the following ASN.1 definition:
    A ::= SEQUENCE
          {
              a [0] INTEGER DEFAULT 0,
              b [1] SEQUENCE OF INTEGER,
              c [2] BOOLEAN OPTIONAL,
              d [3] B
          }
    B ::= SEQUENCE OF C
    C ::= BIT STRING

The numbers specified in square brackets in the ASN.1 of the previous example refer to the tagging that is used when exchanging strings between systems. Because the identifier of the named type (in this case, a, b, c, or d) corresponds not only to the type reference but also to the tagging, it is not necessary to specify the tagging across the API. Tags are determined automatically by CMIP services.

The words DEFAULT and OPTIONAL in an ASN.1 definition indicate that those fields can be omitted in an instance of type reference A. DEFAULT means the field a can be omitted. If it is omitted, CMIP services interprets the field as having a value the default value specified in the syntax. In the previous example, zero is assigned to the field with label A. If it is not omitted, CMIP services does not assign DEFAULT fields default values. Application programs that receive strings containing DEFAULT fields must be able to understand and interpret the omission of the field.

OPTIONAL means that the field c does not have to be specified. When it is not specified, CMIP services does not interpret the field.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014