Function SET193L: List Exchanger

LANSA

Function SET193L: List Exchanger
********** COMMENT(=======================================================);
********** COMMENT();
********** COMMENT(Process ........: SET_193);
********** COMMENT(Function .......: SET193L);
********** COMMENT(Created on .....: 12th October 2000);
********** COMMENT(Description ....: Working List exchanger);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: This function is used to save);
********** COMMENT( or restore the contents of a working list);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as);
********** COMMENT( example material only. No warranty concerning the);
********** COMMENT( material or its use in any way whatsoever is);
********** COMMENT( expressed or implied.);
********** COMMENT();
********** COMMENT(Minimum Release of LANSA Required : 8.0);
********** COMMENT();
********** COMMENT(=======================================================);
FUNCTION OPTIONS(*HEAVYUSAGE *DIRECT) RCV_LIST(#S_193PRM );
********** COMMENT();
********** COMMENT(Define the lists);
********** COMMENT();
DEF_LIST NAME(#S_193PRM) FIELDS((#S_193VNM)(#S_193VIN)(#S_193VTP)(#S_193VAV)) TYPE(*WORKING) ENTRYS(0000123);
DEF_LIST NAME(#S_193SAV) FIELDS((#S_193VNM)(#S_193VIN)(#S_193VTP)(#S_193VAV)) TYPE(*WORKING) ENTRYS(0000123);
********** COMMENT();
********** COMMENT(save or restore the list as requested);
********** COMMENT();
CASE OF_FIELD(#S_193GSR);
********** COMMENT(Save request);
WHEN VALUE_IS('= S');
CLR_LIST NAMED(#S_193SAV);
SELECTLIST NAMED(#S_193PRM);
ADD_ENTRY TO_LIST(#S_193SAV);
ENDSELECT;
********** COMMENT(Restore request);
WHEN VALUE_IS('= R');
CLR_LIST NAMED(#S_193PRM);
SELECTLIST NAMED(#S_193SAV);
ADD_ENTRY TO_LIST(#S_193PRM);
ENDSELECT;
********** COMMENT(Invalid request);
OTHERWISE;
MESSAGE MSGTXT('Invalid request received by SET193L');
ENDCASE;
********** COMMENT();
********** COMMENT(Finished);
********** COMMENT();
RETURN;