Function SET178C Device Type
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_178);
********** COMMENT(Function .......: SET178C);
********** COMMENT(Created on .....: 18/05/00 at 14:43:32);
********** COMMENT(Description ....: Generate a page for each device type);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(generate one page per device type with links to every);
********** COMMENT(relevant brand-devicetype and device subtype);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as an);
********** COMMENT(example only. No warranty is expressed or implied.);
********** COMMENT();
********** COMMENT(Receives: Device Type (#S_178DVTP));
********** 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_178DVTP *HIDDEN)(#S_178DIMG *HIDDEN));
DEF_LIST NAME(#S_LSX178C) FIELDS((#S_178BRND *HIDDEN)(#S_178BPG *INPUT)(#S_178LNPG *HIDDEN));
DEF_LIST NAME(#S_LSY178C) FIELDS((#S_178SBTP *HIDDEN)(#S_178SBPG *INPUT));
********** COMMENT();
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
GROUP_BY NAME(#S_GRPDEV) FIELDS((#S_178DVTP)(#S_178DVPG)(#S_178DIMG));
FETCH FIELDS(#S_GRPDEV) FROM_FILE(SETDEV) WITH_KEY(#S_178DVTP);
********** COMMENT();
USE BUILTIN(TCONCAT) WITH_ARGS(#S_IFSPATH '/') TO_GET(#S_IFSPATH);
USE BUILTIN(WEB_STATIC_PAGE) WITH_ARGS(#S_178DVPG '*NO' #S_IFSPATH);
********** COMMENT();
********** COMMENT();
********** COMMENT(Build a list of all the brands for this device type);
CLR_LIST NAMED(#S_LSX178C);
SELECT FIELDS(#S_LSX178C) FROM_FILE(SETLNKL2) WITH_KEY(BD #S_178DVTP);
CHANGE FIELD(#S_178BPG) TO(#S_178LNPG);
ADD_ENTRY TO_LIST(#S_LSX178C);
ENDSELECT;
********** COMMENT(Build a list of all the subtypes for this device type);
CLR_LIST NAMED(#S_LSY178C);
SELECT FIELDS(#S_LSY178C) FROM_FILE(SETSUB) WITH_KEY(#S_178DVTP);
********** COMMENT(Only add sub types for which products exist);
CHECK_FOR IN_FILE(SETPRDL2) WITH_KEY(#S_178DVTP #S_178SBTP);
IF_STATUS IS(*EQUALKEY);
ADD_ENTRY TO_LIST(#S_LSY178C);
ENDIF;
ENDSELECT;
********** COMMENT();
********** COMMENT();
REQUEST FIELDS(#S_GRPPANL) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
********** COMMENT(browselists will be displayed via SET178C component);
IF COND('1 *EQ 2');
REQUEST BROWSELIST(#S_LSX178C) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
REQUEST BROWSELIST(#S_LSY178C) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
ENDIF;
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_178);
********** COMMENT(Function .......: SET178C);
********** COMMENT(Created on .....: 18/05/00 at 14:43:32);
********** COMMENT(Description ....: Generate a page for each device type);
********** COMMENT(Version.........: 1);
********** COMMENT();
********** COMMENT(Full Description: The purpose of this function is to);
********** COMMENT(generate one page per device type with links to every);
********** COMMENT(relevant brand-devicetype and device subtype);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as an);
********** COMMENT(example only. No warranty is expressed or implied.);
********** COMMENT();
********** COMMENT(Receives: Device Type (#S_178DVTP));
********** 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_178DVTP *HIDDEN)(#S_178DIMG *HIDDEN));
DEF_LIST NAME(#S_LSX178C) FIELDS((#S_178BRND *HIDDEN)(#S_178BPG *INPUT)(#S_178LNPG *HIDDEN));
DEF_LIST NAME(#S_LSY178C) FIELDS((#S_178SBTP *HIDDEN)(#S_178SBPG *INPUT));
********** COMMENT();
********** COMMENT();
********** COMMENT(Mainline);
********** COMMENT();
GROUP_BY NAME(#S_GRPDEV) FIELDS((#S_178DVTP)(#S_178DVPG)(#S_178DIMG));
FETCH FIELDS(#S_GRPDEV) FROM_FILE(SETDEV) WITH_KEY(#S_178DVTP);
********** COMMENT();
USE BUILTIN(TCONCAT) WITH_ARGS(#S_IFSPATH '/') TO_GET(#S_IFSPATH);
USE BUILTIN(WEB_STATIC_PAGE) WITH_ARGS(#S_178DVPG '*NO' #S_IFSPATH);
********** COMMENT();
********** COMMENT();
********** COMMENT(Build a list of all the brands for this device type);
CLR_LIST NAMED(#S_LSX178C);
SELECT FIELDS(#S_LSX178C) FROM_FILE(SETLNKL2) WITH_KEY(BD #S_178DVTP);
CHANGE FIELD(#S_178BPG) TO(#S_178LNPG);
ADD_ENTRY TO_LIST(#S_LSX178C);
ENDSELECT;
********** COMMENT(Build a list of all the subtypes for this device type);
CLR_LIST NAMED(#S_LSY178C);
SELECT FIELDS(#S_LSY178C) FROM_FILE(SETSUB) WITH_KEY(#S_178DVTP);
********** COMMENT(Only add sub types for which products exist);
CHECK_FOR IN_FILE(SETPRDL2) WITH_KEY(#S_178DVTP #S_178SBTP);
IF_STATUS IS(*EQUALKEY);
ADD_ENTRY TO_LIST(#S_LSY178C);
ENDIF;
ENDSELECT;
********** COMMENT();
********** COMMENT();
REQUEST FIELDS(#S_GRPPANL) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
********** COMMENT(browselists will be displayed via SET178C component);
IF COND('1 *EQ 2');
REQUEST BROWSELIST(#S_LSX178C) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
REQUEST BROWSELIST(#S_LSY178C) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
ENDIF;