Add CASE or SWITCH statement operation to translation configuration.
Date:
03/18/2011
Operating System:
AIX
Version of OS:
AIX 6.1
Cloverleaf Version:
5.8
Revision:
Rev 0
Tool:
Translation Configurator
Enhancement Long Description:
Provide a new operation to make it easy to invoke different sets of actions based on a value. It is similar to an IF operation, but allows more then two sets of actions (i.e. IF = actions 1, ELSE = actions 2). This is one example of a possible format:
SWITCH 0(0).MSH(0).#9(0)
CASE =ADT^A01
COPY 0(0).PV1(0).#6(0) -> 0(0).PV1(0).00133
CASE =ADT^A03
COPY 0(0).PV1(0).#6(0).1 -> 0(0).PV1(0).00133
CASE ELSE
COPY 0(0).PV1(0).#6(0).2 -> 0(0).PV1(0).00133
Benefits:
Avoid calling TCL to provide this functionality; avoid nested IFs; allow easy addition of new field value & actions (easier maintenance); make translator more readable and understandable.
Peter Heggie