EXAplus Usage
SQL-Commands in EXAplus
SQL-Commands have to be closed with a semi-colon in EXAplus.
Commands for creating of functions and packages (create or replace <function|package|package body>) may contain semi-colons. These commands have to be closed in EXAplus with a line containing a single „/“.
Start EXAplus in background
When I start EXAplus using nohup, it goes into [stopped] mode. How can I start EXAplus in the background?
The problem with NOHUP is well known and is caused by a conflict between the terminal and a call in EXAplus.
As workaround you can put EXAplus with the help of the program 'setsid' in its own session or use 'screen' to start EXAplus in background:
-
- > nohup setsid exaplus <params>
Useful commands
Eine Nachricht ausgeben
-
- prompt Message;
Print out execution time after each command
-
- SET timing ON;
Avoiding of line breaks in output
-
- SET linesize 20000;
Using of EXAplus variable
-
- DEFINE tab=tabelle;
- DEFINE col=spalte;
- SELECT &tab..&col AS &col.1 FROM &tab;
- -- executed command:
- -- SELECT tabelle.spalte AS spalte1 FROM tabelle;
&var will be substituted with the variable value "var". An after variable name following dot "." will be considered as a separator between the variable name and following text. As shown in the example, if you need a dot after the variable, you have to put two dots after each other. The first one will be considered as a separator and will be removed.
These define variables are a feature of EXAplus. Therefore the substitution will be done bei EXAplus before sending of the command to EXASolution. Define variables cannot be used via other interfaces f.e. ODBC.
Switch off additional output
You may want to process EXAplus output further. In such case it is usefull to be able to switch off all the additional output, e.g. header, etc. If you start EXAplus as a console application, use the -q switch to disable EXAplus output at the program start.
Following commandos help you to format the output for further processing:
-
- SET heading OFF;
- SET feedback OFF;
- SET linesize 2000000;
Comments with help of DEFINE
-
- define nodebug=--
- &nodebug SELECT COUNT(*) FROM ergebnis;
You may want to have some sort of debug output in your script and be able to simply switch it off.
Every line starting with &nodebug will be commented out through simply setting of nodebug to --. If you set "define nodebug=", no lines will be commented out.















