Out-maps are used in encoders to map an internal format to an external format.
Info | ||
---|---|---|
| ||
|
The automatic mapping for out-maps only attempts to bind every field name of the external format to the respectively internal format. Just as with the in-maps, no additional formats or fields are created. Like the in-maps, out-maps support explicit mappings.
As for in-maps, specially named options can also be supplied in the out_map
depending on the type of the external format. The type specific options are:
Option | Description |
---|---|
| Only applicable for ASN.1 based formats. Specifies that PER encoding (ALIGNED version) is to be used. |
| Only applicable for ASN.1 based formats. Specifies that PER encoding (UNALIGNED version) is to be used. |
Optional Fields
There are some additional considerations for the case where optional external fields are encoded.
An internal field can be defined as optional, enabling to encode the corresponding external field as not present. Internal fields with value null
may still be considered present and are encoded as, for instance, an empty string. To override this, use the APL command udrUnsetPresent
prior to encoding.
Consider the following example, where an optional field within an incoming ASN.1 record will be encoded (the definition of myInt
varies).
Info | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Case 1 - Optional internal field: If
Case 2 - Mandatory internal field: If
Case 3 - No mapped internal field:
|
Scroll ignore | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Scroll pagebreak |
---|