Batch File to start a ClassiX® Application

For the start, ClassiX® requires diverse correctly initialised environment variables (also see Environment Variables).

A major part of this will be put into the start batch file that is included and has the name projekt_START.BAT (e.g. Evaluate_START.bat). In this start batch file, should be all sensitive environment settings, such as the database location. These so-called master data are saved here and should not get modified for each case.

Some environment variables are machine- and user-specific. They are put into a batch file, which needs to be adjusted accordingly. The minimum required environment variables are the following:

Furthermore, the country information need to be set correctly; always to the according computer location:

In case the ClassiX® licenses are limited to a certain computer, the license file needs to be specified individually for every computer.

Next to these essential environment variables, it is possible to overwrite general batch file specifications in the local batch file. The following environment variables can be set additionally:

An example for an (up-)rounding batch file which unites all points:

SET CX_ROOTDIR=Y:\classix\Evaluate
SET CX_HELPROOT=http://infothek/
SET CX_EDITOR=c:\cw32\cw32 %%s -g%%d

SET CX_COUNTRY=049
SET CX_STATE=005
SET CX_REGION=001
SET CX_VERSION=4.2

call %CX_ROOTDIR%\projects\evaluate_START.bat %CX_ROOTDIR%\projects\evaluate.cxp

With the first 6 environment variables, this example sets the minimum required number to start ClassiX®. The last line is very specific. Here, the general project_START.BAT gets queried with the .cxp file as a parameter. All other parameters are directly passed to the .exe file in the projekt_START.BAT. In the  project_START.BAT as well as the .cxp file it is important to make sure, that the file name has been specified with a complete path. This should always be relative using %CX_ROOTDIR%.

Further in the general project_START.BAT further environment variables are set, some depending in the variables that have already been set in the local batch file. 

Example for a project_START.BAT:

rem CX_ROOTDIR and CX_HELPROOT should be defined in a calling BAT file!

rem ---------------------------
rem OStore variables generally
rem ---------------------------
SET OS_SCHEMA_PATH=%CX_BIN%
SET OS_AUTH=NONE
if -%OS_AS_SIZE%- == -- SET OS_AS_SIZE=0x42000000
SET OS_RCVBUF_SIZE=32768
SET OS_SNDBUF_SIZE=32768
SET OS_ENABLE_DECACHE_SOFT_POINTERS_AFTER_AS_RELEASE=1

rem ---------------------------
rem ClassiX
® variables generally
rem ---------------------------
SET CX_PROJECT_INITIALS=EVA
SET CX_PROJECT_NAME=EVALUATE
if -%CX_VERSION%- == -- SET CX_VERSION=4.2
if -%CX_BIN%- == -- SET CX_BIN=%CX_ROOTDIR%\bin\%CX_VERSION%
if -%CX_CUSTOMER_DATA%- == -- SET CX_CUSTOMER_DATA=%CX_ROOTDIR%\APPSWH\%CX_PROJECT_NAME%\DATA

SET CX_BITMAP=%CX_ROOTDIR%\Bmp\%CX_PROJECT_NAME%;%CX_ROOTDIR%\Bmp
SET CX_SYSTEM=%CX_ROOTDIR%\System\%CX_PROJECT_NAME%;%CX_ROOTDIR%\System
SET CX_CLUSTERING=255
SET CX_DATABASE=%CX_ROOTDIR%\projects\evaluate.cxd
SET CX_DATABASE_2=%CX_ROOTDIR%\projects\evaluate_2.cxd
SET CX_DATABASE_3=%CX_ROOTDIR%\projects\evaluate_3.cxd
SET CX_SYSTEM_DB=%CX_DATABASE%
SET CX_WORD_DOT=%CX_ROOTDIR%\System\classix.dot
SET CX_PATH=%CX_ROOTDIR%\bin\TAO;%CX_ROOTDIR%\bin\TAOd;%CX_ROOTDIR%\APPSWH\%CX_PROJECT_NAME%;%CX_ROOTDIR%\APPSWH;%CX_ROOTDIR%\APPSWH\%CX_PROJECT_NAME%\DATA;%CX_ROOTDIR%\APPSWH\DATA
IF "%CX_LISTVIEW_READONLY_TXN%" == "" SET CX_LISTVIEW_READONLY_TXN=50

rem ---------------------------
rem Windows variables generally
rem ---------------------------
SET PATH=%PATH%;%CX_BIN%;%CX_ROOTDIR%\bin\LL10

rem ---------------------------
rem set work directory (OS error and temp. files)
rem ---------------------------
SET ADIR=C:\TEMP
IF DEFINED TEMP SET ADIR=%TEMP%
IF EXIST %ADIR% cd %ADIR%

rem ---------------------------
rem Start
rem ---------------------------
start %CX_BIN%\cx_osr.exe %1 -iEvaluate.ini %2 %3 %4 %5

If multiple ClassiX® systems are operating, such as a real system and a test system, it makes sense to e betrieben werden, z.B. ein Echt-System und ein Test-System, so hat es sich als praktikabel erwiesen, die entsprechenden Einstellungen in der allgemeinen Batch-Datei zu verankern und nur über einen Parameter zu steuern. Die allgemeine Batch-Datei könnte dann folgendermaßen aussehen:

rem CX_ROOTDIR and CX_HELPROOT shall be for example defined in a calling BAT file!

if "%2" == "ECHT" goto ECHT
if "%2" == "TEST" goto TEST

:REAL
if "%CX_SERVER%" == "" SET CX_SERVER=\\cxeva\EVA_DB
if "%CX_DATABASE%" == "" SET CX_DATABASE=%CX_SERVER%\ClassiX\Evaluate\projects\evaluate.cxd
if "%OS_SCHEMA_PATH%" == "" SET OS_SCHEMA_PATH=%CX_SERVER%\ClassiX\Evaluate\projects\edb
goto WEITER

:TEST
if "%CX_SERVER%" == "" SET CX_SERVER=\\clxdb0\CX_DB
if "%CX_DATABASE%" == "" SET CX_DATABASE=%CX_SERVER%\ClassiX\Evaluate\projects\evaluate_test.cxd
if "%OS_SCHEMA_PATH%" == "" SET OS_SCHEMA_PATH=%CX_SERVER%\ClassiX\Evaluate\projects\edb
goto WEITER

:FURTHER

rem ... here continue accordingly with general batch file as above.

The call in the local batch file controls with a further parameter, which gets started in theDer Aufruf in der lokalen Batch-Datei steuert dann über einen weiteren Parameter, welches der ClassiX®-Systeme gestartet wird:

call %CX_ROOTDIR%\projects\evaluate_START.bat %CX_ROOTDIR%\projects\evaluate.cxp ECHT