Form S_189FH

LANSA

Form S_189FH

*===================================================================;
*;
* Component : S_189FH;
* Type : Form;
* Ancestor : PRIM_FORM (Primitive Form);
*;
* Description : SELECT_SQL - Sub-select parameter ALL; ;
*;
* Disclaimer : The following material is supplied as sample material;
* only. No warranty concerning this material or its use;
* in any way whatsoever is expressed or implied.;
*;
* ===================================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM HEIGHT(386) LEFT(306) TOP(145) WIDTH(449);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_1) CAPTION('EXAMPLE 1: Select all employees from the Personnel Master file whose salary is greater than ALL employees in the range A0001 to A1007. This examples uses the subselect parameter ALL. This subselection will be executed first and creates an internal table. When this is done, it compares the result of the internal table with the base file of this SELECT_SQL statement.') DISPLAYPOSITION(2) HEIGHT(66) LEFT(7) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(7) WIDTH(426);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LTVW_1) DISPLAYPOSITION(4) HEIGHT(97) LEFT(152) PARENT(#COM_OWNER) TABPOSITION(4) TOP(80) WIDTH(120);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#LTVW_1) SOURCE(#EMPNO) WIDTH(101);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_2) CAPTION('EXAMPLE 2: First select all employees from the Personnel Skills file with an employee number < A1234. When this is done, it looks in the Personnel Master file to see if there are customers with an employee number > every entry in the subselection table.') DISPLAYPOSITION(1) HEIGHT(49) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(192) WIDTH(426);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LTVW_2) DISPLAYPOSITION(3) HEIGHT(97) LEFT(152) PARENT(#COM_OWNER) TABPOSITION(3) TOP(248) WIDTH(120);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) DISPLAYPOSITION(1) PARENT(#LTVW_2) SOURCE(#EMPNO) WIDTH(21) WIDTHTYPE(Remainder);
;
;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption(*component_desc);
;
* Fill ListView for example 1;
clr_list #ltvw_1;
SELECT_SQL FIELDS(#EMPNO) FROM_FILES((PSLMST)) WHERE('SALARY > ALL (SELECT SALARY FROM "XDEMOLIB"."PSLMST" WHERE EMPNO < ''A1007'')');
add_entry #ltvw_1;
endselect;
;
* Fill ListView for example 2;
clr_list #ltvw_2;
SELECT_SQL FIELDS(#EMPNO) FROM_FILES((PSLMST)) WHERE('EMPNO > ALL (SELECT EMPNO FROM "XDEMOLIB"."PSLSKL" WHERE EMPNO < ''A1234'')');
add_entry #ltvw_2;
endselect;
ENDROUTINE;
;
END_COM;
;