Previous Topic: Graphic-oriented Source Type

Next Topic: Transparent Source Types

Numeric-oriented Source Types

Where the target is one of the numeric-oriented or transparent types, the local form of the source data is converted to the local form of the target. The source and target local form values are equal in most cases, although their external form output can differ depending on their respective types. The following, however are exceptions:

Where the target is one of the graphic-oriented types, the external form output of the source data is assigned to the target as though it was external input.

In either case a type check results if the data is invalid for the source or target types.

Example: Numeric-oriented Source Types

&ASSIGN MDO=a.b.int TYPE=REAL DATA=99.99
                    -* target type is INTEGER
&ASSIGN VARS=RESULT FROM MDO=a.b.int
                    -* returns &RESULT = 100 (value rounded)
&ASSIGN MDO=a.b.bool DATA=TRUE
                    -* source type is BOOLEAN
&ASSIGN VARS=RESULT FROM MDO=a.b.bool TYPE=HEX
                    -* output type is HEX STRING
                    -* returns &RESULT = 01 (that is, TRUE)
&ASSIGN MDO=a.b.bit DATA=11101
                    -* source type is BIT STRING
&ASSIGN MDO=a.b.num FROM a.b.bit
                    -* target type is NumericString
&ASSIGN VARS=RESULT FROM MDO=a.b.num
                    -* returns &RESULT = 11101000