Section 2.6: Connect Up Chapter 2: Install Section 2.8: DECIMAL format 

2.7 aubitrc

All Aubit4GL compilers read their configuration files in this order:
  1. /etc/opt/aubit4gl/aubitrc (only if you run: make install)
  2. $AUBITDIR/etc/aubitrc
  3. ~/.aubit4gl/aubitrc
  4. ./.aubitrc
Values in later files override those already set in earlier files. The aubitrc file in $AUBITDIR/etc is based on and is edited to appropriate values by the configure program. To see what your current settings are run the command:
aubit-config -a
You can edit these files with a text edit program such as vi(m) or (x)emacs or you can choose to use one of the programs that Aubit4GL supplies:
quickguide is new with version 1.20 and is now the preferred method to set the environment.

2.7.1 Binary

The file $AUBITDIR/etc/aubitrc will be the one set up when Mike Aubury created the binary tarball. It will almost always be wrong for your setup. Change it. Whenever you install a binary make sure you have saved your aubitrc beforehand (e.g. in /local/etc/aubitrc or as oaubitrc in $AUBITDIR/etc) and then selectively reassert your entries from your saved aubitrc into the newly installed one. Run the diff command on the old and new and look for differences in settings. (The new one my have extra settings which you should add to the old aubitrc.

2.7.2 Source

Your new aubitrc will be built by merging a file with settings the configure found. It should be close to what you want apart from things where you have a multiple choice (e.g. postgresql or sqlite3)

2.7.3 Plugins

Aubit4GL uses an abstraction layer for many of its functions. This means that the way Aubit4GL works can be controlled very tightly by the setting of various variables. These variables specify which plugins will be loaded by the compiler and/or 4GL program. At this stage you need only concern yourself with SQLTYPE and LEXTYPE. The defaults for all the other plugins will be appropriate. Informix

export A4GL_SQLTYPE=esql
export A4GL_LEXTYPE=EC PostgreSQL

export A4GL_SQLTYPE=pg8

export A4GL_SQLTYPE=mysql
export A4GL_LEXTYPE=C SQLite3

export A4GL_SQLTYPE=sqlite3
export DBPATH=$DBPATH:/path/to/sqlite3database Others

The others will need ODBC and esqlc
export A4GL_SQLTYPE=iodbc


To configure all your access to databases you should populate an ACL file. By default this is:
But you can set up an alternative one and set environment variable
export A4GL_SQLACL=/path/to/file
The ACL file should contain lines with 3 fields:
The password should be in plain text but will be automatically encrypted (albeit with a somewhat weak encryption) the first time the file is read. If there is an entry in this file with the database name at the top of the 4gl file, Aubit4GL should use that username and password for the connection.
You can also assign username and password to the SQLUID and SQLPWD environment variables.
For PostgreSQL, if it is just the port you want to change - you could set PG_PORT instead.
For PostgreSQL you can set PG_HOST to a hostname. e.g.:
export PG_HOST=myhost
 Section 2.6: Connect Up Chapter 2: Install Section 2.8: DECIMAL format