Form VL_SAM136: Submit Tier Aware Batch Jobs

LANSA

Form VL_SAM136: Submit Tier Aware Batch Jobs
Name: VL_SAM136

Description: The following RDMLX form is used to submit the tier aware batch function VSAM137.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMPOSITION(ScreenCenter) HEIGHT(357) LAYOUTMANAGER(#ATLM_1) LEFT(257) TOP(262) VISUALSTYLE(#VS_NORM) WIDTH(541);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(1) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(308) WIDTH(533);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_GPBX) NAME(#GPBX_1) CAPTION('Employee List') DISPLAYPOSITION(2) HEIGHT(308) LAYOUTMANAGER(#ATLM_2) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(0) WIDTH(353);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Left) MANAGE(#GPBX_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_2);
DEFINE_COM CLASS(#PRIM_GPBX) NAME(#GPBX_2) DISPLAYPOSITION(3) HEIGHT(308) LEFT(353) PARENT(#COM_OWNER) TABPOSITION(3) TABSTOP(False) TOP(0) WIDTH(180);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Center) MANAGE(#GPBX_2) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#EMP_LIST) DISPLAYPOSITION(1) HEIGHT(291) LEFT(4) PARENT(#GPBX_1) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(13) WIDTH(345);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Center) MANAGE(#EMP_LIST) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) CAPTION('Number') CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#EMP_LIST) SOURCE(#EMPNO) WIDTH(22);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) CAPTION('Surname Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(3) PARENT(#EMP_LIST) SOURCE(#SURNAME) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_3) CAPTION('Given Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(2) PARENT(#EMP_LIST) SOURCE(#GIVENAME) WIDTH(42);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_REFRESH) CAPTION('Refresh Employee List') DISPLAYPOSITION(3) LEFT(22) PARENT(#GPBX_2) TABPOSITION(3) TOP(16) WIDTH(136);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_SUBMIT) CAPTION('Submit Batch Job') DISPLAYPOSITION(2) LEFT(24) PARENT(#GPBX_2) TABPOSITION(2) TOP(56) WIDTH(137);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_UPDATE) CAPTION('Update Employee') DISPLAYPOSITION(1) LEFT(24) PARENT(#GPBX_2) TABPOSITION(1) TOP(96) WIDTH(137);
DEFINE_COM CLASS(#PRIM_GPBX) NAME(#GPBX_3) CAPTION('Employee to be Actioned') DISPLAYPOSITION(4) HEIGHT(153) LEFT(16) PARENT(#GPBX_2) TABPOSITION(4) TABSTOP(False) TOP(144) WIDTH(153);
DEFINE_COM CLASS(#EMPNO.Visual) NAME(#EMPNO) DISPLAYPOSITION(1) HEIGHT(38) LABELPOSITION(Top) LEFT(8) MARGINLEFT(0) MARGINTOP(19) PARENT(#GPBX_3) TABPOSITION(1) TOP(16) VISUALSTYLE(#VS_NOREAD) WIDTH(104);
DEFINE_COM CLASS(#GIVENAME.Visual) NAME(#GIVENAME) DISPLAYPOSITION(2) HEIGHT(38) LABELPOSITION(Top) LEFT(8) MARGINLEFT(0) MARGINTOP(19) PARENT(#GPBX_3) TABPOSITION(2) TOP(60) WIDTH(129);
DEFINE_COM CLASS(#SURNAME.Visual) NAME(#SURNAME) DISPLAYPOSITION(3) HEIGHT(38) LABELPOSITION(Top) LEFT(8) MARGINLEFT(0) MARGINTOP(19) PARENT(#GPBX_3) TABPOSITION(3) TOP(103) WIDTH(127);
;
* =====================================================;
* Handle Form Initialization (note reference to the data tier) ;
* =====================================================;
;
EVTROUTINE handling(#Com_Owner.Initialize);
Change #Std_Obj *Data_Tier;
Execute Load_Emps (*Blanks);
ENDROUTINE;
;
* =====================================================;
* Handle Form closing by ending the connections to all tiers ;
* =====================================================;
;
EVTROUTINE handling(#Com_Owner.Closing);
Change #Std_Obj *End_All_Tiers;
ENDROUTINE;
;
* =====================================================;
* Handle Refresh request ;
* =====================================================;
;
EVTROUTINE HANDLING(#BTN_REFRESH.Click);
Execute Load_Emps (#Empno);
ENDROUTINE;
;
* =====================================================;
* Handle Submit Batch Job Request ;
* =====================================================;
;
EVTROUTINE HANDLING(#BTN_SUBMIT.Click);
Exchange #Empno;
Call Process(*direct) function(VSAM137) exit_used(*next) menu_used(*next);
ENDROUTINE;
;
* =====================================================;
* Handle Employee Update;
* =====================================================;
;
EVTROUTINE HANDLING(#BTN_UPDATE.Click);
Update (#SurName #GiveName) In_file(Pslmst) with_key(#Empno) issue_Msg(*yes);
ENDROUTINE;
;
* =====================================================;
* Load list of employees ;
* =====================================================;
;
Subroutine Load_Emps ((#Sel_Empno *Received));
Define #Sel_EmpNo RefFld(#Empno);
Change #Std_Num 1;
Clr_List #Emp_List;
Select (#Empno #SurName #GiveName) From_File(Pslmst);
Add_Entry #Emp_List;
if '#Empno = #Sel_EmpNo';
Change #Std_Num #Emp_List.CurrentItem.Entry;
Endif;
EndSelect;
Get_Entry #Std_Num #Emp_List;
If_Status *okay;
Set #Emp_List.CurrentItem Selected(True) EnsureVisible(True) ;
Endif;
EndRoutine;
;
END_COM;