ENUM

Synopsis

HELP:   Maps enumeration to an integer
TYPE:   OBJECT
SYNTAX: ENUM(CHRSET(CCSID='str'/DEFAULT/ASCII/EBCDIC/SYSTEM/LOCAL,CASE=UPPER/LOWER/FOLD/SUPPER/SLOWER/USRTAB,COMBINED=NFD/NFC/AUTO/ON/OFF,USRTABLE='str'/NPAS/SEPA/DELA/DLAX,WHITESPACE=PRESERVE/REPLACE/COLLAPSE/REMOVE/TRAILING/LEADING/BOTH/NUMBER,ONEMAP),ITEM[(VALUE='str',NUMERICAL=num)...])

Description

This object can be used to read enumerations, i.e. fields with a limited number of allowed string values. An enumeration contains one or more items. There must be one item for each accepted string. Additionally, the charset of the input data may optionally be set.

Example

   ENUM(
       ITEM(VALUE='EUR' NUMBER=1)
       ITEM(VALUE='USD')
       ITEM(VALUE='BTC')
       CHRSET(CCSID=1141)
   )

The first item 'EUR' is assigned the number 1. The following items are automatically numbered 2 and 3, respectively. Only integers values, which are defined, are converted to the respective strings. If there is an integer in the data for which no string is defined, an error occurs. Strings in the input data must be encoded in CCSID 1141.