Skip to main content
Skip table of contents

Local Mode

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:

XML
<db:databaseCatalog xmlns:db="http://str.com.au/superadmin/database/schema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="root"
    xsi:schemaLocation="http://str.com.au/superadmin/database/schema database.xsd">
  <db:displayName>Root</db:displayName>
  <db:database id="people" security="false">
    <db:displayName>People Database</db:displayName>
    <db:location>databases/People.sxv4</db:location>
    <db:server>localhost</db:server>
  </db:database>
  <db:database id="bank" security="false">
    <db:displayName>Retail Banking</db:displayName>
    <db:location>databases/RetailBanking.sxv4</db:location>
    <db:server>localhost</db:server>
  </db:database>
</db:databaseCatalog>

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).

The <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:

  1. Select File > Save As.
  2. 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:

XML
<CONFIG>
    <KEY name="ProductionSystem">
        <KEY name="Connection">
            <STRING name="ConnectionType">LOCAL_SERVER</STRING>
            <STRING name="DatabasePath">E:\Production System\local_catalogue.xml</STRING>

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):

XML
<KEY name="OutputFormats">
    <BOOL name="EnableCharSepOutput" value="true" />
    <BOOL name="EnableTXDOutput" value="false" />
    <BOOL name="EnableSXV4Output" value="false" />
    <BOOL name="EnableXMLOutput" value="true" />
    <BOOL name="EnableCALSOutput" value="false" />
    <BOOL name="EnableRVOutputCSV" value="false" />
</KEY> 

When you have finished making changes, save the configuration file.

If you are using SXV4 files that were created prior to SuperSTAR version 8.0 and the SXV4s contain non English/ASCII characters, then you may need to change the LocalLegacySXV4Codepage setting in order to use these SXV4 files in local mode. See Unicode for more details.

Step 4 - Run Production System

You are now ready to run Production System.

  1. Open a Command Prompt.
  2. If you are using Linux, make sure you have sourced the SuperSERVER environment variables (see Getting Started for more details).
  3. If necessary, use the cd command 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.
  4. 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:

    CODE
    sa2ps -tn AgeByArea

    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 -op option. For example, the following command saves all the output files to a subdirectory called output within the current directory:

    CODE
    sa2ps -tn AgeByArea -op output

    This directory must already exist. Production System will not create the directory if it does not already exist.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.