In addition to running Production System in remote mode (connecting to a SuperSERVER), it also also possible to run Production System locally. In local mode, Production System accesses local copies of the SXV4 database files, without having to communicate with SuperSERVER.
The process for running Production System locally is similar to running in remote mode, but there is one additional step: you need to set up an XML file that contains details of the local database catalogue.
Step 1 - Configure the Local Database Catalogue XML
Before you can run Production System locally, you need to set up the local database catalogue. This tells Production System where to find the local copies of the SXV4 databases.
There is a sample XML catalogue called svdatabase.xml located in the SuperSERVER program data directory (by default this is located at C:\ProgramData\STR\SuperSERVER SA\svdatabase.xml). You can use this as a template for creating your own version.
The sample supplied with SuperSERVER will be similar to the following:
As you can see, for each SXV4 database you want to use locally, you will need a
<db:database> ... </db:database> section in the XML catalogue file.
Make a copy of svdatabase.xml file and modify it to include all the local SXV4 databases you want to use.
You can save your version of svdatabase.xml anywhere, and give it any filename you like (you will tell Production System where to find it in a later step).
<db:location> ... </db:location> sections tell Production System where to find the local copy of the SXV4. The path and filename can either be an absolute path or a relative path. If you choose to use a relative path it will need to be relative to the working directory where you are going to run Production System.
Step 2 - Create your TXD Files
You will need to use SuperCROSS to design your tables and save them in TXD format.
See Getting Started for help with creating tables in SuperCROSS. Once you have designed a table that you want to process with Production System:
- Select File > Save As.
- In the Save as type option, choose the Textual table Definition (.TXD) (*.txd) file type, and save your TXD file.
Step 3 - Set your Default Options in the Production System Configuration File
The next step is to configure your Production System settings.
Although it is possible to specify all settings on the command line if you wish, Production System also has a configuration file (located at C:\ProgramData\STR\SuperSERVER SA\sa2ps.config.xml by default). It is generally easier to set most of the settings that you are going to use most of the time in the configuration file. This way you will only need to specify a few command line options if there are any settings you want to override for a specific table.
See Configuration File for a full list of all the possible options, but at the very least you will want to set the connection type to
LOCAL_SERVER and specify the location of the local database catalogue:
This example uses an absolute path to the local catalogue file. It is also possible to use a relative path (please note that a relative path here needs to be relative to the location of sa2ps.config.xml).
Change any other settings you want to change in the configuration file. For example, you might want to enable some of the other output formats (by default the configuration only enables CSV output):
When you have finished making changes, save the configuration file.
Step 4 - Run Production System
You are now ready to run Production System.
- Open a Windows Command Prompt.
- If necessary, use the
cdcommand to navigate to an appropriate directory:
- If your local database catalogue contains relative paths to the local SXV4 databases then you will need to change to the root directory for these relative paths.
- If your local database catalogue contains absolute paths then you can run Production System from any directory.
If you have defined all your required settings in the configuration file, then you can run Production System using a command similar to the following:
In this example, Production System will process a TXD file called AgeByArea.txd that is located in the current directory and the output will be saved in the current directory.
It is also possible to set the output directory using the
-opoption. For example, the following command saves all the output files to a subdirectory called output within the current directory:
This directory must already exist. Production System will not create the directory if it does not already exist.