|
This function combines the transferred parameters of the previously executed commands 'select', 'where', and 'order by' (optional), carries out the selection and assigns the search result data to the corresponding variables. After correct execution of the selection this function returns an integer value containing the number of records and transfers the record contents to the corresponding variables. |
|||
![]() |
This command must not be called in a conditional instruction. | |||
Syntax: |
||||
{INT_VAR}= exec_select({NUM_EXPR}) or |
||||
I/O parameters: |
||||
Return value: |
||||
|
||||
![]() |
In cases where the values of several data records are to be transferred (NUM_EXPR = 0 or NUM_EXPR > 1), specification of normal variables for the 'select' command must have the values of the last data record allocated after the execution of the 'exec_select' function. (All values of a selected column are sequentially allocated to the corresponding variable, overwriting the last value of each). If a 'select' command contains any field elements then all field elements after the specified field index are overwritten by values from the specified record. You must make sure that field dimensions are defined accordingly. |
|||
Example: |
||||
Declaration of Variables | ||||
10 select (PRO_NAME) 20 where ("T_PRO_DAT.PROJ_ID"="TEST%") 30 DOCU_INT_1=exec_select(1) 40 put(PRO_NAME) Variable definition: PRO_NAME S "T_PRO_DAT.PROJ_NAME" |
||||
![]() |
Functions and commands: DB / Mask Interface |