You are here: Elements > Methods > Retrieval Methods

RetrievalMethods

Retrieval Methods are used in RETRIEVE clauses in FIELD statements when the field value and/or size is to be modified. They can also be used as subordinates in STORE clauses. Retrieval Methods are applicable only for fields of size 64 bits or less.

You can string two or more RETRIEVE clauses together using the ALSO keyword. You should not repeat the keyword RETRIEVE for subsequent method invocations. For example, assume you have a field that contains a signed decimal, which is a temperature in Fahrenheit. You are converting a decoder for use in your international offices and want to display the temperature in Celsius. First you need to make the value into a signed decimal and then perform the calculations. The result would look like:

FIELD temperature (Fixed 2 Bytes) RETRIEVE (SignExtension 16 Bits) ALSO (SubtractInteger 32) ALSO (MultiplyInteger 5) ALSO (DivideInteger 9) (Decimal) "Temperature"

The number of RETRIEVE clauses you can string together with ALSO is unlimited.