Function SET190C
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_190);
********** COMMENT(Function .......: SET190C);
********** COMMENT(Created on .....: 20/11/00 at 14:53:52);
********** COMMENT(Description ....: Prompt on Poll Status);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(allow the user to select a valid poll status from a);
********** COMMENT(hard coded list);
********** COMMENT();
********** COMMENT(Generated using Template: FRPOP04);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as);
********** COMMENT(sample 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: 8.0);
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function control options);
FUNCTION OPTIONS(*DIRECT);
********** COMMENT();
********** COMMENT(Define the description field and browselist);
DEFINE FIELD(#VALUEDESC) TYPE(*CHAR) LENGTH(040) COLHDG('Description');
DEF_LIST NAME(#LIST01) FIELDS((#S_190PST)(#VALUEDESC)) SEL_ENTRY(#LISTENTRY);
CLR_LIST NAMED(#LIST01);
********** COMMENT(Set up the list of valid values);
EXECUTE SUBROUTINE(ADD_VALUE) WITH_PARMS('DEFINE' 'Poll is being defined and cannot be run');
EXECUTE SUBROUTINE(ADD_VALUE) WITH_PARMS('OPEN' 'Poll can be run by respondents');
EXECUTE SUBROUTINE(ADD_VALUE) WITH_PARMS('CLOSED' 'Poll has finished collecting responses');
********** COMMENT(Display the pop-up window until a record is selected);
DOUNTIL COND('#LISTENTRY *GT 0');
POP_UP AT_LOC(005 022) WITH_SIZE(*AUTO) PANEL_TITL('Poll Status') BROWSELIST(#LIST01) EXIT_KEY(*NO) PROMPT_KEY(*NO) CURSOR_LOC(*ATFIELD #S_190PST);
ENDUNTIL;
********** COMMENT(Retrieve selected entry & pass back to calling program);
GET_ENTRY NUMBER(#LISTENTRY) FROM_LIST(#LIST01);
EXCHANGE FIELDS(#S_190PST);
MENU;
********** COMMENT(***************************************************);
********** COMMENT(ADD_VALUE - Adds an entry to the browselist);
********** COMMENT(***************************************************);
SUBROUTINE NAME(ADD_VALUE) PARMS((#S_190PST) (#VALUEDESC));
ADD_ENTRY TO_LIST(#LIST01);
ENDROUTINE;
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_190);
********** COMMENT(Function .......: SET190C);
********** COMMENT(Created on .....: 20/11/00 at 14:53:52);
********** COMMENT(Description ....: Prompt on Poll Status);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(allow the user to select a valid poll status from a);
********** COMMENT(hard coded list);
********** COMMENT();
********** COMMENT(Generated using Template: FRPOP04);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as);
********** COMMENT(sample 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: 8.0);
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function control options);
FUNCTION OPTIONS(*DIRECT);
********** COMMENT();
********** COMMENT(Define the description field and browselist);
DEFINE FIELD(#VALUEDESC) TYPE(*CHAR) LENGTH(040) COLHDG('Description');
DEF_LIST NAME(#LIST01) FIELDS((#S_190PST)(#VALUEDESC)) SEL_ENTRY(#LISTENTRY);
CLR_LIST NAMED(#LIST01);
********** COMMENT(Set up the list of valid values);
EXECUTE SUBROUTINE(ADD_VALUE) WITH_PARMS('DEFINE' 'Poll is being defined and cannot be run');
EXECUTE SUBROUTINE(ADD_VALUE) WITH_PARMS('OPEN' 'Poll can be run by respondents');
EXECUTE SUBROUTINE(ADD_VALUE) WITH_PARMS('CLOSED' 'Poll has finished collecting responses');
********** COMMENT(Display the pop-up window until a record is selected);
DOUNTIL COND('#LISTENTRY *GT 0');
POP_UP AT_LOC(005 022) WITH_SIZE(*AUTO) PANEL_TITL('Poll Status') BROWSELIST(#LIST01) EXIT_KEY(*NO) PROMPT_KEY(*NO) CURSOR_LOC(*ATFIELD #S_190PST);
ENDUNTIL;
********** COMMENT(Retrieve selected entry & pass back to calling program);
GET_ENTRY NUMBER(#LISTENTRY) FROM_LIST(#LIST01);
EXCHANGE FIELDS(#S_190PST);
MENU;
********** COMMENT(***************************************************);
********** COMMENT(ADD_VALUE - Adds an entry to the browselist);
********** COMMENT(***************************************************);
SUBROUTINE NAME(ADD_VALUE) PARMS((#S_190PST) (#VALUEDESC));
ADD_ENTRY TO_LIST(#LIST01);
ENDROUTINE;