SET208L

LANSA

SET208L
* =======================================================
* Process ........: SET_208
* Function .......: SET208L
* Created on .....: 4/10/01 at 14:53:37
* Description ....: Act as a list manager for SET208H
*
* Full Description: This function is called to manage
* a single aggregated list for SET208H.
*
* SET208H clears and fills the aggregated list and then
* calls other SET208x functions to handle various MS-Word
* and MS-Excel documents. They then call this function to
* lookup values that were passed into SET208H by S_208FMF
* running ion a Windows NT/2000 server system
*
* Disclaimer: The following material is supplied as
* sample material only. No warranty concerning the
* material or its use in any way whatsoever is
* expressed or implied.
*
* =======================================================
FUNCTION OPTIONS(*DIRECT *HEAVYUSAGE)
*
* Master values list
*
DEFINE FIELD(#W_208NAME) REFFLD(#S_208NAME)
DEFINE FIELD(#W_208INST) REFFLD(#S_208INST)
DEF_LIST NAME(#LIST) FIELDS(#W_208NAME #W_208INST #S_208AVAL #S_208NVAL) TYPE(*WORKING) ENTRYS(0000500)
*
* Examine the #S_208OPER value to decide what to do
*
CASE OF_FIELD(#S_208OPER)
WHEN VALUE_IS('= LOCATE')
*
* Handle a request to locate a list entry
*
USE BUILTIN(UPPERCASE) WITH_ARGS(#S_208NAME) TO_GET(#S_208NAME)
LOC_ENTRY IN_LIST(#LIST) WHERE('(#S_208NAME = #W_208NAME) AND (#S_208INST = #W_208INST)')
IF_STATUS IS(*OKAY)
EXCHANGE FIELDS(#S_208AVAL #S_208NVAL)
ENDIF
WHEN VALUE_IS('= ADD')
*
* Handle a request to add a new entry to the list
*
CHANGE FIELD(#W_208NAME) TO(#S_208NAME)
CHANGE FIELD(#W_208INST) TO(#S_208INST)
ADD_ENTRY TO_LIST(#LIST)
WHEN VALUE_IS('= CLEAR')
*
* Handle a request to clear the current list
*
CLR_LIST NAMED(#LIST)
OTHERWISE
*
* Handle a bad request by aborting
*
ABORT MSGTXT('Unknown operation requested of SET208L')
ENDCASE
*
* Finished
*
RETURN