Function SET011D: Show Employee Details
FUNCTION OPTIONS(*DIRECT *WEBEVENT);
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_011);
********** COMMENT(Function .......: SET011D);
********** COMMENT(Created on .....: 20/02/00);
********** COMMENT();
********** COMMENT(Full Description: This function shows the details of);
********** COMMENT(the employee selected in SET011C);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as an);
********** COMMENT(example only. No warranty is expressed or implied.);
********** COMMENT();
********** COMMENT(Group and field definitions);
********** COMMENT(*******************************************************);
OVERRIDE FIELD(#SKILDESC) COLHDG('Skill (s)');
OVERRIDE FIELD(#DATEACQ) COLHDG('Acquired');
********** COMMENT(Overlay the numeric postcode so that it can be);
********** COMMENT(concatenated with the rest of the address.);
DEFINE FIELD(#POSTCODEA) TYPE(*CHAR) LENGTH(006) TO_OVERLAY(#POSTCODE 001);
********** COMMENT();
DEFINE FIELD(#FULLADDRE) TYPE(*CHAR) LENGTH(075);
DEFINE FIELD(#S_EMPNUMB) REFFLD(#EMPNO);
********** COMMENT(Fields used in <ONCONDITION> tags:);
********** COMMENT(HAS_SKILL, if employee has no skills, display a message);
********** COMMENT((component S_011NOSK).);
DEFINE FIELD(#HAS_SKILL) REFFLD(#LISTCOUNT) TO_OVERLAY(#LISTCOUNT 001);
********** COMMENT(FIRS_TIME invoked don't display);
DEFINE FIELD(#FIRS_TIME) TYPE(*DEC) LENGTH(001) DECIMALS(0);
********** COMMENT(Skills browselist);
DEF_LIST NAME(#S_011SKLL) FIELDS((#SKILDESC)(#DATEACQ)) COUNTER(#LISTCOUNT);
********** COMMENT();
GROUP_BY NAME(#PANELDATA) FIELDS((#FULLADDRE *OUTPUT)(#PHONEHME *OUTPUT)(#PHONEBUS *OUTPUT)(#STARTDTE *OUTPUT)(#S_EMPNUMB *HIDDEN)(#SALARY *OUTPUT)(#STDRENTRY *HIDDEN)(#FIRS_TIME *HIDDEN)(#FULLNAME *HIDDEN));
********** COMMENT();
CLR_LIST NAMED(#S_011SKLL);
********** COMMENT();
IF COND('#stdrentry *ne Y');
CHANGE FIELD(#STDRENTRY) TO(Y);
GOTO LABEL(REQ);
ENDIF;
********** COMMENT();
********** COMMENT(FETCH the Employee details. If Employee not found it);
********** COMMENT(means they have selected a different department. If is);
********** COMMENT(If the details of an employee are being displayed and);
********** COMMENT(another section is selected, those details have to);
********** COMMENT(disappear from the screen. To cause that we use the);
********** COMMENT(same flag as the one used when the function is run);
********** COMMENT(for the first time.);
FETCH FIELDS(*ALL) FROM_FILE(PSLMST) WITH_KEY(#S_EMPNUMB);
IF_STATUS IS_NOT(*OKAY);
CHANGE FIELD(#FIRS_TIME) TO(0);
GOTO LABEL(REQ);
ELSE;
CHANGE FIELD(#FIRS_TIME) TO(1);
ENDIF;
********** COMMENT();
USE BUILTIN(BCONCAT) WITH_ARGS(#GIVENAME #SURNAME) TO_GET(#FULLNAME);
********** COMMENT();
USE BUILTIN(BCONCAT) WITH_ARGS(#ADDRESS1 #POSTCODEA #ADDRESS2 #ADDRESS3) TO_GET(#FULLADDRE);
********** COMMENT();
********** COMMENT(Populate the skills browselist.);
SELECT FIELDS((#SKILCODE)(#DATEACQ)) FROM_FILE(PSLSKL) WITH_KEY(#S_EMPNUMB);
SELECT FIELDS(#SKILDESC) FROM_FILE(SKLTAB) WITH_KEY(#SKILCODE);
ADD_ENTRY TO_LIST(#S_011SKLL);
ENDSELECT;
ENDSELECT;
********** COMMENT();
REQ: REQUEST FIELDS(#PANELDATA) BROWSELIST(#S_011SKLL) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
********** COMMENT(*******************************************************);
FUNCTION OPTIONS(*DIRECT *WEBEVENT);
********** COMMENT(=======================================================);
********** COMMENT(Process ........: SET_011);
********** COMMENT(Function .......: SET011D);
********** COMMENT(Created on .....: 20/02/00);
********** COMMENT();
********** COMMENT(Full Description: This function shows the details of);
********** COMMENT(the employee selected in SET011C);
********** COMMENT();
********** COMMENT(Disclaimer: The following material is supplied as an);
********** COMMENT(example only. No warranty is expressed or implied.);
********** COMMENT();
********** COMMENT(Group and field definitions);
********** COMMENT(*******************************************************);
OVERRIDE FIELD(#SKILDESC) COLHDG('Skill (s)');
OVERRIDE FIELD(#DATEACQ) COLHDG('Acquired');
********** COMMENT(Overlay the numeric postcode so that it can be);
********** COMMENT(concatenated with the rest of the address.);
DEFINE FIELD(#POSTCODEA) TYPE(*CHAR) LENGTH(006) TO_OVERLAY(#POSTCODE 001);
********** COMMENT();
DEFINE FIELD(#FULLADDRE) TYPE(*CHAR) LENGTH(075);
DEFINE FIELD(#S_EMPNUMB) REFFLD(#EMPNO);
********** COMMENT(Fields used in <ONCONDITION> tags:);
********** COMMENT(HAS_SKILL, if employee has no skills, display a message);
********** COMMENT((component S_011NOSK).);
DEFINE FIELD(#HAS_SKILL) REFFLD(#LISTCOUNT) TO_OVERLAY(#LISTCOUNT 001);
********** COMMENT(FIRS_TIME invoked don't display);
DEFINE FIELD(#FIRS_TIME) TYPE(*DEC) LENGTH(001) DECIMALS(0);
********** COMMENT(Skills browselist);
DEF_LIST NAME(#S_011SKLL) FIELDS((#SKILDESC)(#DATEACQ)) COUNTER(#LISTCOUNT);
********** COMMENT();
GROUP_BY NAME(#PANELDATA) FIELDS((#FULLADDRE *OUTPUT)(#PHONEHME *OUTPUT)(#PHONEBUS *OUTPUT)(#STARTDTE *OUTPUT)(#S_EMPNUMB *HIDDEN)(#SALARY *OUTPUT)(#STDRENTRY *HIDDEN)(#FIRS_TIME *HIDDEN)(#FULLNAME *HIDDEN));
********** COMMENT();
CLR_LIST NAMED(#S_011SKLL);
********** COMMENT();
IF COND('#stdrentry *ne Y');
CHANGE FIELD(#STDRENTRY) TO(Y);
GOTO LABEL(REQ);
ENDIF;
********** COMMENT();
********** COMMENT(FETCH the Employee details. If Employee not found it);
********** COMMENT(means they have selected a different department. If is);
********** COMMENT(If the details of an employee are being displayed and);
********** COMMENT(another section is selected, those details have to);
********** COMMENT(disappear from the screen. To cause that we use the);
********** COMMENT(same flag as the one used when the function is run);
********** COMMENT(for the first time.);
FETCH FIELDS(*ALL) FROM_FILE(PSLMST) WITH_KEY(#S_EMPNUMB);
IF_STATUS IS_NOT(*OKAY);
CHANGE FIELD(#FIRS_TIME) TO(0);
GOTO LABEL(REQ);
ELSE;
CHANGE FIELD(#FIRS_TIME) TO(1);
ENDIF;
********** COMMENT();
USE BUILTIN(BCONCAT) WITH_ARGS(#GIVENAME #SURNAME) TO_GET(#FULLNAME);
********** COMMENT();
USE BUILTIN(BCONCAT) WITH_ARGS(#ADDRESS1 #POSTCODEA #ADDRESS2 #ADDRESS3) TO_GET(#FULLADDRE);
********** COMMENT();
********** COMMENT(Populate the skills browselist.);
SELECT FIELDS((#SKILCODE)(#DATEACQ)) FROM_FILE(PSLSKL) WITH_KEY(#S_EMPNUMB);
SELECT FIELDS(#SKILDESC) FROM_FILE(SKLTAB) WITH_KEY(#SKILCODE);
ADD_ENTRY TO_LIST(#S_011SKLL);
ENDSELECT;
ENDSELECT;
********** COMMENT();
REQ: REQUEST FIELDS(#PANELDATA) BROWSELIST(#S_011SKLL) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO);
********** COMMENT(*******************************************************);