HP 3000 Manuals

HP ALLBASE/SQL Host Variable References [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Reference Manual Vol. 1

HP ALLBASE/SQL Host Variable References 

You can reference an ALLBASE/4GL item within an SQL logic block or SQL
select list by using the full item name prefixed with a colon (:).

SQL logic blocks and SQL select lists can contain references to
ALLBASE/4GL file record fields, work area fields, fully qualified screen
field names, variables, calculated items, and constants.  You cannot use
references to scratch-pad fields or communication area fields.

You cannot use substrings in references to screen field names within SQL
logic blocks and SQL select lists.

Format 

:data_ref 

where data_ref is the ALLBASE/4GL item name, including the item's type
prefix.

For example,

:V-due_date               Refers to the variable due_date.

:F-unit_cost.option       Refers to the field unit_cost on the file
                          record option.

:S-acct_no.orders         Refers to the field acct_no on the screen
                          orders.

References to host variables cannot include null indicator variables.
However, ALLBASE/4GL does support reading and writing null values.  You
can use the *NULL argument for the IF command to test for null status in
ALLBASE/4GL. You can also use the *NULL argument for the MOVE command to
set the ALLBASE/4GL indicator associated with an HP ALLBASE/SQL table or
select list buffer field to the null status.



MPE/iX 5.0 Documentation