Dbgl Directives

ENVIRONMENT

Each Dbgl script must have the ENVIRONMENT directive. This enables you to be able to use the associated libraries.

ENVIRONMENT krja        

USING

Makes a database accessible. Once the database is open the tables and fields can be used as variables. The syntax is as follows:

USING DATABASE <database name>/<datasheet name>        

Optionally, you can specify an alias. In this case the syntax is:

USING DATABASE <database name>/<datasheet name> ALIAS <alias name>        
Example
USING DATABASE demo.tek/tek ALIAS db1            

In this example, the database tables and field access can be made using the following syntax:

Database    demo.tek                 db1 
Table       demo.tek:header          db1:header 
Field       demo.tek:header:area     dbl:header:area

LET-EQUIVALENT

This directive allows the using of shorter expression replacing often used variables. The syntax is:

LET <name> BE EQUIVALENT TO <expression>        
LET x BE EQUIVALENT TO demo.tek:geotec:amgest        

To use the equivalent macro, you must precede the name with the @ character, for example:

@x