|
VADELIA |
SADELIA |
WADELIA |
EADELIA |
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(B) (C/S) |
Section for use
DECLARATION
Syntax
LIST ListName IndicParam ListComponents
ListName |
→ |
ListVariableName |
| <GRAPHIC_OBJECT variable> :LIST |
||
IndicParam |
→ |
*INDIC | None |
ListComponents |
→ |
ListComponents VarId |
| ListComponents EntityAccJoinRef |
||
| ListComponents ListRef |
||
| ListField |
||
| EntityAccJoinRef |
||
| ListRef |
||
ListField |
→ | VarId| VarId,ExportName (Only with Web services.) |
EntityAccJoinRef |
→ | *REF_LDM(EntityAccJoin) |
ListRef |
→ | *REF_L(ListName) |
Description
Declaration of a list named ListName, which is comprised of environment variables (work variables, screen fields and file variables), and all the fields in a given file, or all the fields in an existing list.
You can refer to all the fields in an entity, access or join entity, by using the *REF_LDM keyword followed by the name of an entity, access or join entity.
You can refer to all the fields in a list in the environment, by using the *REF_L keyword followed by the name of a list.
The *INDIC parameter indicates that the list will internally generate a dummy variable (in the SQL sense) for each of its fields.
This type of list is only useful when there are CREATE_SQL instructions with the *BLOCK parameter and the user wants to manage the NULL values.
Its dummy variables are updated by the SET_INDICATOR instruction.
With reportless VADELIA Batch programs intended for use in Web service production, if the list is a parameter of either the program or a public procedure, you can associate an export name, NomExport, for each field explicitly declared using the LIST instruction. This export name, rather than the Adelia field's guide word, will be used in the generated Web service's XML diagram.
Working with LIST properties of GRAPHIC_OBJECT variables
In order to use a LIST property of a GRAPHIC_OBJECT variable, you must first define the property.
It is possible to assign a LIST property of a graphic object variable to a list name:
in an interactive or batch Visual Adelia program:
LIST LIST_OBJ_VAR:LIST COL1 COL2
- in an interactive Visual Adelia program:
LIST LIST_OBJ_VAR:LIST *REF_L(WIN1_ID.LIST_ID:LISTE)
This syntax does not support the *REF_LDM(...) and *GLOBAL parameters.
It requires all variables to be GRAPHIC_OBJECTS declared by *DEF, with unambiguous Adelia definitions.
Note: when declaring the LIST property of a GRAPHIC_OBJECT variable, the LIST instruction can only be used once to declare the LIST property.
Example 1
* Declaration of memory lists in a DECL paragraph
* series of fields
LIST MLS_EMPLOYEE EM_EMPL_CODE EM_EMPL_NAME EM_EMPL_CITY
* refer to entity structure
LIST MLS_CUSTOMER *REF_LDM(CUSTOMER)
* refer to graphic list structure
LIST MLS_TEMPO *REF_L(MLS_ITEM:LIST)
Example 2
* Using the LIST property of a GRAPHIC_OBJECT variable
DECL_PGM
GRAPHIC_OBJECT(LIST) LIST_OBJ_VAR
GRAPHIC_OBJECT(COLUMN) COL_OBJ_VAR *DEP(LIST_OBJ_VAR:LIST)
ALPHA(10) COL1
REF(WIN1_ID.COL_ID:VALUE) COL2
LIST LIST_OBJ_VAR:LIST COL1 COL2 * Usable in a VA_I or VA_B program.
LIST LIST_OBJ_VAR:LIST *REF_L(WIN1_ID.LIST_ID:LIST) * Usable in a VA_I program.
END_DECL
The working variables COL1 and COL2 are used to access the values in the list.
The list management 4GL instructions (READ_F_ELT, SORT_LST, DELETE_ELT, etc.) can be used.
Example 3
* Using the LIST property of a GRAPHIC_OBJECT variable
DECL_PGM
GRAPHIC_OBJECT(LIST) LIST_OBJ_VAR
GRAPHIC_OBJECT(COLUMN) COL1_OBJ_VAR *DEF(ALPHA(10))
GRAPHIC_OBJECT(COLUMN) COL2_OBJ_VAR *DEF(NUM_BIN_4)
LIST LIST_OBJ_VAR:LIST COL1_OBJ_VAR COL2_OBJ_VAR * Usable in a VA_I or VA_B program.
LIST LIST_OBJ_VAR:LIST *REF_L(WIN1_ID.LIST_ID:LIST) * Usable in a VA_I program.
END_DECL
You access to the values in the list via COL1_OBJ_VAR and COL2_OBJ_VAR variables: The list management 4GL instructions (READ_F_ELT, SORT_LST, DELETE_ELT, etc..) can be used.