VADELIA |
SADELIA |
WADELIA |
EADELIA |
|
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(B) (C/S) |
Section for use
DECLARATION
Syntax
VIEW ViewName ViewAccessType ExplicitOpening Commit InfsrProc
ViewAccessType |
→ |
*KEY EntityAccJoin AccessField |
| *DIRECT EntityAccJoin NumericVarId |
||
| *SEQ EntityAccJoin |
||
AccessField |
→ |
AccessField, VarId | VarId |
ExplicitOpening |
→ |
*OPEN | None |
Commit |
→ |
*COMMIT | None |
InfsrProc |
→ |
*INFSR(ProcedureName) | None |
Description
Declaration of a view named ViewName which accesses an entity, access or join entity EntityAccJoin, with the access type ViewAccessType and the fields AccessField forming the key for the declared view.
If *DIRECT is the access type to the view, NumericVarId must be a numeric variable whose length is higher than or equal to 10.
An entity, access or join entity can be explicitly opened using the *OPEN word.
The *COMMIT parameter can be used to open an entity, access or join entity subject to a commitment control procedure.
The *INFSR parameter is used to specify the name of the INFSR procedure for the file concerned, for an RPG generation (AS/400 server part).
Example
VIEW CUSTOMER *KEY CUSTOMERL2 COUNTRY_CODE,TOWN_CODE
VIEW CUSTOMER *KEY CUSTOMERL1 CUST_ID *OPEN
VIEW CUSTOMER *KEY CUSTOMERL1 CUST_ID *COMMIT
VIEW CUSTOMER *KEY CUSTOMERL1 CUST_ID *OPEN *COMMIT
VIEW ITEM *DIRECT ITEML1
VIEW FAMILY *SEQ FAMILYL1 RANK
VIEW ITEM *KEY ITEM W_CODE *INFSR(PROC)