The Ultra Module
A saved format is referred to by the qualified name under which it was saved (its module name). In APL or UFDL, it can be referred to by the module name followed by a dot and the name of the internal definition. Alternatively import statements can be used to avoid the necessity of always specifying the module name.
The import Statement (APL Code)
In Analysis and Aggregation agents, module names are not needed if the format is selected in the UDR Types list in the configuration dialog of the agent. Also, the APL Editor allows selection of the UDR types from a list. Right-click in the Code Area to display the UDR Assistance... via which the UDR Internal Format Browser can be opened.
If none of these lists are used, the full format name must be referred to, or the import
 keyword must be used. The module name must be prefixed with ultra.
to distinguish format imports from APL code imports.
Example - Referring to UDR Types in the APL Editor
The module in this example is named Default.CDR
, and contains the target_internal
 CDR_TI
 which is to be used in a function created in the APL Editor.
Case 1 - import statement
import ultra.Default.CDR;
CDR_TI newUDR() {
CDR_TI myUDR = udrCreate( CDR_TI );
myUDR.field1 = 22;
myUDR.field2 = 55;
return myUDR;
}
Case 2 - no import
Default.CDR.CDR_TI newUDR() {
Default.CDR.CDR_TI myUDR = udrCreate( Default.CDR.CDR_TI );
myUDR.field1 = 22;
myUDR.field2 = 55;
return myUDR;
}
The import Statement (UFDL Code)
It is possible to split different blocks of a format between several format definitions. In these cases, the import
 statement may be used to avoid referring to the module name. The ultra.
 prefix is not needed (or allowed) in the UFDL import statement.
Using import
 in UFDL Code
Suppose there is a format definition with the module name Default.AMA
 containing an internal myInt
, and a new format definition must include the internal in the in_map
. This can be accomplished in two ways:
Case 1 - import
import Default.AMA;
in_map exMap : external( myCDR ),
internal( myInt ),
target_internal( myCDR_TI ) {
automatic;
};
Case 2 - no import
Note!
Referring to ASN.1 structures from outside the format definition requires the ASN.1 module (if defined) to be part of the reference.
When invoking theÂ
import ultra.
 function from within the folder that contains the UFDL file, you do not need to specify the folder name.
Name Lookup Rules
Consider the following ASN.1 block example. Depending on from where a format name is referred, the name lookup works differently.
References from within the asn_block
 specification:
If there is a name in theÂ
asn_block
 specification, choose this name.If there is a name in the same format definition, choose this name.
Evaluate theÂ
import
 statements.
References from within the same module but outside of the asn_block
:
If there is a name in the same format definition (outside of anyÂ
asn_block
 specifications), choose this name.If there is a name in theÂ
asn_block
 specification, choose this name.Evaluate theÂ
import
 statements.