Function SET178B Front Page

LANSA

Function SET178B Front Page

********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_178);
********** COMMENT(Function .......: SET178B);
********** COMMENT(Created on .....: 18/05/00 at 14:43:32);
********** COMMENT(Description ....: Generate the front page);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(generate the single front page with links to every);
********** COMMENT(device type and brand.);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as an);
********** COMMENT(example only. No warranty is expressed or implied.);
********** COMMENT();
********** COMMENT(Receives: nothing);
********** COMMENT();
********** COMMENT();
********** COMMENT(=======================================================);
********** COMMENT(Function control options);
FUNCTION OPTIONS(*DIRECT *WEBEVENT);
********** COMMENT();
********** COMMENT(<RDML ONCONDITION> field.);
********** COMMENT(Group and field definitions);
********** COMMENT();
GROUP_BY NAME(#S_GRPPANL) FIELDS((#S_178FDES *HIDDEN)(#S_178FRNT *HIDDEN));
DEF_LIST NAME(#S_LSX178B) FIELDS((#S_178DVTP *HIDDEN)(#S_178DIMG *HIDDEN)(#S_178DVPG *INPUT));
DEF_LIST NAME(#S_LSY178B) FIELDS((#S_178BRND *HIDDEN)(#S_178BIMG *HIDDEN)(#S_178BPG *INPUT));
********** COMMENT();
********** COMMENT(Used to make the front page different from other pages);
DEFINE FIELD(#S_178FRNT) TYPE(*CHAR) LENGTH(001) DEFAULT(Y);
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
********** COMMENT();
USE BUILTIN(TCONCAT) WITH_ARGS(#S_IFSPATH '/') TO_GET(#S_IFSPATH);
USE BUILTIN(WEB_STATIC_PAGE) WITH_ARGS('S_178MAIN' '*NO' #S_IFSPATH);
********** COMMENT();
********** COMMENT();
********** COMMENT(Build a list of all device types);
CLR_LIST NAMED(#S_LSX178B);
SELECT FIELDS(#S_LSX178B) FROM_FILE(SETDEV);
CHECK_FOR IN_FILE(SETPRDL2) WITH_KEY(#S_178DVTP);
IF_STATUS IS(*EQUALKEY);
ADD_ENTRY TO_LIST(#S_LSX178B);
ENDIF;
ENDSELECT;
********** COMMENT(Build a list of all the major brands);
CLR_LIST NAMED(#S_LSY178B);
SELECT FIELDS(#S_LSY178B) FROM_FILE(SETBRD) WHERE('#S_178BMAJ *EQ Y');
********** COMMENT(only those brands with products are listed);
CHECK_FOR IN_FILE(SETPRDL1) WITH_KEY(#S_178BRND);
IF_STATUS IS(*EQUALKEY);
ADD_ENTRY TO_LIST(#S_LSY178B);
ENDIF;
ENDSELECT;
********** COMMENT();
********** COMMENT();
REQUEST FIELDS(#S_GRPPANL) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
********** COMMENT(browselists displayed via component SET178B);
IF COND('1 *EQ 2');
REQUEST BROWSELIST(#S_LSX178B) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
REQUEST BROWSELIST(#S_LSY178B) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
ENDIF;