Products Downloads


French version


 

 

ADELIA

      

      

      

      

(I)

 

 

 

 

 

Warning: This instruction is only compatible with the RPG generator.

 

Section for use

INITIALIZATION

 

Syntax

MANAGE_SFL_SQL n SeriesEntities Distinct SelectedColumns Condition SortOption LinesOptimisation MaxLines Parameter

 

SeriesEntities

SeriesEntities, Entity | Entity

Entity

EntityName CorrelationName | EntityName

Distinct

*DISTINCT | None

     

SelectedColumns

*COL(SeriesEntityFields) | NONE

Condition

AdeliaCondition | *COND(:VarId)

 

 

 

Parameter

*NO_MR | *MR | NONE

SeriesEntityFields

SeriesEntityFields, EntityVarId | EntityVarId

LinesOptimisation

*OPT(n) | None

MaxLines

*LINES(x) | None

 

 

Description

This instruction marks the beginning of a subfile processing. It must be followed by the END_MANAGE_SFL instruction.

 

n is the number of the relevant subfile; it is the number following the asterisk (*) in the layout format code. For example: 1 for *1 or 4 for *4.

 

By default, the instruction returns the values of all the entities' columns.

However, it is possible to retrieve only the values which are specified in SelectedColumns.

 

If *DISTINCT is specified, only distinct lines are retrieved (as opposed to all columns or columns selected in SelectedColumns).

 

It is possible to ask the SQL optimizer to optimise the execution of the request in order to retrieve the first x lines of the cursor more quickly (*OPT parameter). By default, when the condition is not *COND(:VarId) type, a subfile in dynamic pagination works with an optimisation clause corresponding to the number of lines of subfile per page. To prevent Adelia from generating the optimisation clause, enter the *OPT(0) parameter.

 

Furthermore, it is possible to set the request optimizer to only retrieve the first x lines of the cursor (*LINES parameter).

 

The *MR parameter is used to generate the read implicit management rules related to the entity, even if the program is generated with the implicit management rule generation option.

 

The *NO_MR parameter prevents the generation of the read implicit management rules related to the entity, even if the program is generated with the implicit management rule generation option.

 

Click here for the explanation of the SortOption element.

 

Important note: When the condition is contained in a *COND(:VarId) variable, the variable must contain the "where" part of an SQL query, in which the real names of the columns and tables must be given, not their Adelia names.

 

Example

MANAGE_SFL_SQL 1 ITEM *COND(CITEM_CODE>:WITEM_COD) *SORT(CITEM_CODE)

PRESENT ITEM

UPD_SFL

END_MANAGE_SFL

 

See also the list of 4GL instructions by topic

↑ Top of page

  • Aucune étiquette