DSM Template Services Manual

Template Language
DSM Template Services Manual427187-004
3-14
DEF_ENUM Statement
Example 3-6. DEF_ENUM Example—DDL Definition File for Fictitious
FEET Subsystem
! DDL source code
! file name \cat.$kit.clsexmpl.d5a
?dict $kit.clstacl
! Make subsystem for FEET.
! Define the subsystem ID for the subsystem FEET. First the constants
! are declared, then the subsystem ID is defined.
CONSTANT feet-val-ss-owner VALUE IS "BODY".
CONSTANT feet-val-ss-number VALUE IS 230.
CONSTANT feet-val-ss-version VALUE IS VERSION "C20".
CONSTANT feet-val-ssid-string VALUE IS "BODY.230.C20".
DEFINITION feet-val-ssid.
02 z-filler TYPE CHARACTER 8 VALUE IS feet-val-ss-owner.
02 z-owner REDEFINES z-filler
TYPE zspi-ddl-char8.
02 z-number TYPE zspi-ddl-int VALUE IS feet-val-ss-number.
02 z-version TYPE zspi-ddl-uint VALUE IS feet-val-ss-version.
END.
! Define the shared token feet-tkn-retcode.
CONSTANT feet-tnm-retcode VALUE IS 2307.
TOKEN-TYPE feet-typ-retcode VALUE IS zspi-tdt-enum
DEF IS zspi-ddl-enum.
TOKEN-CODE feet-tkn-retcode VALUE IS feet-tnm-retcode
TOKEN-TYPE IS feet-typ-retcode
SSID feet-val-ssid-string
HEADING "FEET return code".
! Define the enumeration feet-ddl-retcode-state. In the template source
! file listed previously, the shared token feet-tkn-retcode is associated
! with this enumeration by using a DEF_ENUM statement.
DEFINITION feet-ddl-retcode-state TYPE ENUM TACL ENUM AS "UNDEFINED"
BEGIN.
89 ds-ok VALUE IS 0 AS "OK".
89 ds-disconnected VALUE IS -1 AS "DISCONNECTED".
END.