Generic Types for Field Symbols and Parameters
The following new generic data types are now available for assigning types to parameters and field symbols:
- SIMPLE is compatible with all the types that are compatible with CLIKE, XSEQUENCE, or NUMERIC – that is, with all elementary types including STRING and XSTRING. Assigning the generic type SIMPLE ensures that parameters or field symbols can be displayed using WRITE or used in arithmetic operations. However, conversion errors may occur when parameters and field symbols of this type are used in arithmetic operations, depending on the content – for example, a C field is passed as an actual parameter and the field content cannot be interpreted as a number.
- CLIKE is compatible with the types C, N, D, T, STRING, and purely character-type structures. In NUSs, CLIKE is also compatible with the elementary types X and XSTRING. Assigning the generic type CLIKE ensures that parameters and field symbols can be used for all operations string processing operations, such as those in the CONCATENATE, FIND, and REPLACE statements. You also guarantee that the system counts in characters when performing offset/length accesses. These are allowed in the range of the entire field, or within the current string length for STRING-type components.
- CSEQUENCE is compatible with the types C and STRING
- XSEQUENCE is compatible with the types X and XSTRING. Assigning this generic type guarantees that parameters and field symbols can be used in byte processing operations, such as in the CONCATENATE ... IN BYTE MODE statement.
- NUMERIC is compatible with the types I, P, and F. It is also compatible with two types that are only available in the Dictionary - INT1 (single-byte integer) and INT2 (double-byte integer). Note that type N is not compatible with the generic type NUMERIC. Assigning the generic type NUMERIC ensures that parameters and field symbols can be used in arithmetic operations without type or conversion errors occurring.