Form VL_SAM147 : Tier Aware Subroutines with List Parameters

LANSA

Form VL_SAM147 : Tier Aware Subroutines with List Parameters
Name: VL_SAM147

Description: The following RDMLX form is used to execute the tier aware subroutine VSAM146.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMPOSITION(ScreenCenter) LAYOUTMANAGER(#ATLM_1) LEFT(280) TOP(118) VISUALSTYLE(#VS_NORM) WIDTH(586);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_GPBX) NAME(#GPBX_1) DISPLAYPOSITION(1) LAYOUTMANAGER(#FWLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) WIDTH(578);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Top) MANAGE(#GPBX_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_GPBX) NAME(#GPBX_2) DISPLAYPOSITION(2) HEIGHT(263) LAYOUTMANAGER(#ATLM_2) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(50) WIDTH(578);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Center) MANAGE(#GPBX_2) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) FLOWOPERATION(Center) FLOWOPERATIONVER(Center) MARGINLEFT(4);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_2);
DEFINE_COM CLASS(#SURNAME.Visual) NAME(#SRCHNAME) DISPLAYPOSITION(1) HEIGHT(19) LEFT(8) MARGINLEFT(100) PARENT(#GPBX_1) TABPOSITION(1) TOP(19) WIDTH(253);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_1) MANAGE(#SRCHNAME) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_SEARCH) BUTTONDEFAULT(True) CAPTION('Search') DISPLAYPOSITION(2) LEFT(271) PARENT(#GPBX_1) TABPOSITION(2) TOP(16);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_2) MANAGE(#BTN_SEARCH) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#RSLT_LIST) DISPLAYPOSITION(1) HEIGHT(226) LEFT(4) PARENT(#GPBX_2) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(11) WIDTH(570);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Center) MANAGE(#RSLT_LIST) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) CAPTION('Number') CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#RSLT_LIST) SOURCE(#EMPNO) WIDTH(10);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) CAPTION('SurName') CAPTIONTYPE(Caption) DISPLAYPOSITION(2) PARENT(#RSLT_LIST) SOURCE(#SURNAME) WIDTH(18);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_3) CAPTION('First Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(3) PARENT(#RSLT_LIST) SOURCE(#GIVENAME) WIDTH(14);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_4) CAPTION('Dept') CAPTIONTYPE(Caption) DISPLAYPOSITION(4) PARENT(#RSLT_LIST) SOURCE(#DEPTMENT) WIDTH(8);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_5) CAPTION('Description') CAPTIONTYPE(Caption) DISPLAYPOSITION(5) PARENT(#RSLT_LIST) SOURCE(#DEPTDESC) WIDTH(15);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_6) CAPTION('Section') CAPTIONTYPE(Caption) DISPLAYPOSITION(6) PARENT(#RSLT_LIST) SOURCE(#SECTION) WIDTH(10);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_7) CAPTION('Description') CAPTIONTYPE(Caption) DISPLAYPOSITION(7) PARENT(#RSLT_LIST) SOURCE(#SECDESC) WIDTH(15);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_8) CAPTION('Skills') CAPTIONTYPE(Caption) DISPLAYPOSITION(8) PARENT(#RSLT_LIST) SOURCE(#STD_NUM) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(2) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#GPBX_2) TABPOSITION(2) TABSTOP(False) TOP(241) WIDTH(578);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_2);
DEFINE_COM CLASS(#STD_NUM.Visual) NAME(#EMP_COUNT) CAPTION('Employees') DISPLAYPOSITION(1) HEIGHT(16) LABELTYPE(Caption) LEFT(479) MARGINLEFT(55) PARENT(#STBR_1) READONLY(True) TABPOSITION(1) TABSTOP(False) TOP(4) VISUALSTYLE(#VS_NOREAD) WIDTH(97);
;
* ===================;
* Form Initialization;
* ===================;
;
EVTROUTINE handling(#Com_Owner.Initialize);
Change #Std_Obj *Data_Tier;
ENDROUTINE;
;
* ============;
* Form Closing;
* ============;
;
EVTROUTINE handling(#Com_Owner.Closing);
Change #Std_Obj *End_All_Tiers;
ENDROUTINE;
;
* ====================;
* Handle Search Button;
* ====================;
;
EVTROUTINE HANDLING(#BTN_SEARCH.Click);
DEFINE FIELD(#XXX_COUNT) TYPE(*DEC) LENGTH(7) DECIMALS(0);
DEFINE FIELD(#TOTSKILLS) REFFLD(#XXX_COUNT);
DEFINE FIELD(#RETN_RQST) TYPE(*CHAR) LENGTH(10);
GROUP_BY NAME(#XG_LIST) FIELDS(#EMPNO #GIVENAME #SURNAME #DEPTMENT #DEPTDESC #SECTION #SECDESC #TOTSKILLS);
DEF_LIST NAME(#RETN_LIST) FIELDS(#XG_LIST) TYPE(*WORKING);
EXCHANGE FIELDS(#RETN_RQST #SRCHNAME) OPTION(*ALWAYS);
*;
* Call VSAM147 to build up the results list. Repeat this until;
* There is nothing more to return for this search. ;
* ;
Message 'Searching for employee details' Type(*Status);
Change #RetN_Rqst Select;
Clr_List #Rslt_List;
*;
DoUntil '#RetN_Rqst *Ne More';
Call Process(*Direct) Function(VSAM146) pass_lst(#RetN_List) Exit_Used(*Next) Menu_Used(*Next) ;
SeLectList #RetN_List;
Change #Std_Num #TotSkills ;
Add_Entry #Rslt_List;
EndSelect;
EndUntil;
;
Message 'Search completed';
Set #Emp_Count Value(#Rslt_List.Entries);
;
ENDROUTINE;
;
END_COM;