Batch Automation Utilities

You may be in a situation where a GUI interface is not available. This may be a common problem when a Linux station is used. In other cases, it may be more convenient to double-click a batch file to activate the Mapping Utility via the Administrator. The batch files can be found in the utilities directory in the ApplinX installation directory.


Migration Batch File

ApplinX applications from previous ApplinX versions are able to run on the current ApplinX version once you have performed a number of migration activities. Migration can be performed when installing the new ApplinX Server version or via batch files after the new server has been installed. You can:

  • Migrate all ApplinX applications, when installing/upgrading ApplinX.

  • Migrate all ApplinX applications via batch files, after ApplinX has been installed.

  • Migrate a specific ApplinX application, after ApplinX has been installed.

To migrate all ApplinX applications after installing/upgrading ApplinX you must run migrate_ApplinX_server.bat/sh file, enter the installation path of your previous installation, and then enter the new path of the current installation.

For example: migrate_ApplinX_server.bat "c:\ApplinX52" "c:\SoftwareAG\ApplinX"

Refer to Migrating Applications from Previous ApplinX Versions

Convert Utility Batch File

This utility is used to convert gxz files which include the application configuration from previous ApplinX versions, to gxar files.

Start of instruction setTo activate the Convert Utility batch file using the command prompt window:

  1. Open a command prompt window.

  2. Change the current directory to the relevant directory.

  3. Type convert_gxz_to_gxar followed by your required parameters. (The minus sign and letter should precede the value to distinguish between the parameters. The order of the parameters is not significant.). For example: -u Administrator -f "C:\Documents and Settings\sagsis.gxz"

Parameter Description Default
-s Server address 127.0.0.1
-p Server port 2323
-u User name  
-w Password  
-f File name  

Importing Screens using a Batch File

Standard maps, such as Natural, BMS and MFS, are used in host applications and include the screen data such as static data and dynamic fields. ApplinX enables importing these application maps, saving time and effort spent on manually identifying screens and simplifying the update process when changes are made in the host. When importing application maps, a screen is automatically created from each map, minimizing errors that may occur when creating the screens manually, one by one. The ApplinX screen created includes identifiers (based on the static data) and fields (based on the dynamic data). ApplinX supports a number of different types of maps:

  • Natural: Natural map support (from Systrans file).

  • BMS: CICS basic map support.

  • MFS: IMS message format service.

  • SDFX: ApplinX generic map format, used for other standard maps. To create SDFX files refer to SDFX File Format Definition.

  • SDF: Compatible with Software AG's JIS product.

The import map feature can be used to import an application's maps for a new application or to maintain and update previously imported maps. When updating previously imported maps, screen identifiers will be deleted and replaced, existing fields will be updated with their new positions and their references to other entities will be preserved. Fields that were previously imported, but no longer exist on the host will be deleted.

Note:
Invalid entity names, such as names which include invalid characters such as "#" or begin with a digit, will be automatically corrected by omitting the invalid characters.

Maps can be imported either using the Import Host Screen Maps wizard or using a batch file.

Start of instruction setTo import screens via a batch file (using the command prompt window):

  1. Open a command prompt window.

  2. Change the current directory to the <ApplinX home>/Utilities directory.

  3. Type screen_import.bat/sh followed by your required parameters. (The minus sign and letter should precede the value to distinguish between the parameters. The order of the parameters is not significant.)

Parameter Description Default
-s Server address 127.0.0.1
-p Server port 2323
-u ApplinX user name (Required parameter)  
-w ApplinX user password Empty by default
-a ApplinX application name (Required parameter)  
-f File name, or directory name (when importing more than one file). Required parameter  
-x The file extension. All files from the given directory that have this extension will be loaded (when not specified, the default extension for the map type is used)  
-af ApplinX target folder within the application repository. Root folder
-t Map type. Possible values: "sdf", "sdfx", "natural", "bms", "mfs" (required parameter). natural
-m Indicates where the error line is located: "first", "last", "lastm1" (last minus 1), "lastm2", "lastm3", "lastm4" (Natural maps only) last
-mf Message line field name (Natural maps only) MessageLine
-k Don't skip map with write command. (Natural maps only) true (skip)

The screens created appear in the directory you determined in the Target folder field. The names of the screens are identical to the map names.

The report is displayed in the Eclipse console and includes a list of the screens added as well as the fields and tables created/updated/deleted.

Export Batch File

Start of instruction setTo activate the Export batch file by using the command program prompt:

  1. Open a command prompt window.

  2. Change the current directory to the <ApplinX home>/Utilities directory.

  3. Type exportapp followed by your required parameters. (The minus sign and letter should precede the value to distinguish between the parameters. The order of the parameters is not significant.)

exportapp Parameters

Parameter Description Default Value
-s Server address 127.0.0.1
-p Server port 2323
-u User name  
-w Password  
-a Application name  
-f

The target folder and/or file name.

  • When only the path is specified (<pathname>followed by "\"), the file name is the application name.

  • When only the file name is specified, the file is created in the current location.

<current location>\<application name>
Include one of the following parameters:  
-c Export only the application configuration (gxar file)  
-e Export only entities (gxz file)  
-l Export the application configuration and the entities (gxar file)  

Examples for the -f parameter

  • Specify target folder and file name: exportapp.bat -s localhost -p 2323 -u administrator -a InstantDemo -f C:\SoftwareAG_821_GA\ApplinX\utilities\export\MyApplication -c

    The file MyApplication.gxar is created in the C:\SoftwareAG_821_GA\ApplinX\utilities\export\ direrctory.

  • Specify target folder only: exportapp.bat -s localhost -p 2323 -u administrator -a InstantDemo -f C:\SoftwareAG_821_GA\ApplinX\utilities\export\ -c

    The file InstantDemo.gxar is created in the C:\SoftwareAG_821_GA\ApplinX\utilities\export\ directory

  • Specify file name only: exportapp.bat -s localhost -p 2323 -u administrator -a InstantDemo -f MyApplication -c

    The file MyApplication.gxar is created in the current local directory.

  • Default when the parameter is not specified: exportapp.bat -s localhost -p 2323 -u administrator -a InstantDemo -c

    The file InstantDemo.gxar is created in the current local directory.

Examples for the -c, -e and -l parameters

  • Export application configuration only: exportapp.bat -s localhost -p 2323 -u administrator -a InstantDemo -f C:\SoftwareAG_821_GA\ApplinX\utilities\export\ -c

    The file InstantDemo.gxar is created.

  • Export entities only: exportapp.bat -s localhost -p 2323 -u administrator -a InstantDemo -f C:\SoftwareAG_821_GA\ApplinX\utilities\export\ -e

    The file InstantDemo.gxz is created.

  • Export application configuration and entities: exportapp.bat -s localhost -p 2323 -u administrator -a InstantDemo -f C:\SoftwareAG_821_GA\ApplinX\utilities\export\ -l

    The file InstantDemo.gxar is created.

Import Batch File

Start of instruction setTo activate the Import batch file by using the command program prompt:

  1. Open a command prompt window.

  2. Change the current directory to the <ApplinX home>/Utilities directory.

  3. Type importapp followed by your required parameters. (The minus sign and letter should precede the value to distinguish between the parameters. The order of the parameters is not significant.)

importapp.bat/sh [-a [attribute]] [-s [attribute]] [-p [attribute]] [-o [attribute]] [-u [attribute]] [-f [attribute]] [-w [attribute]]

Note:
If you want to import a complete ApplinX application, you will require a gxar (ApplinX application archive) file. This file includes the application configuration, ApplinX entities (as a read only <gxz> file) and a trace file. When importing only the application's entities, you require the gxz file only.

importapp Parameters

Parameter Description Default Value
-a ApplinX application name [required].  
-s ApplinX Server address. localhost
-p ApplinX Server port. 2323
-o One of the following operations can be performed:
  • x - Import entities from a gxz file, overriding conflicting entities.

  • c - Import application from a gxar file, retaining the existing host configuration. The repository will be read-only.

  • h - Import application and host configuration from a gxar file (overriding existing host configuration). The repository will be read-only.

  • r - Import application and host configuration. When importing, retain the repository configuration (import the gxz within the gxar, to the currently configured repository).

  • hr - Perform both 'h' and 'r' operations.

When not set, entities and/or configuration will be imported to an existing application when one exists, or to a new application when there is no existing one.

 
-u ApplinX user [required].  
-f The path and name of the gxz/gxar file [required].  
-w ApplinX user password.  

Note:
The Session Data entity will be merged with the existing Session Data entity. When there is a conflict between the imported to the existing Session Data entity, your selection in this check box will determine how the Session Data entity will be.

Examples:

importapp.bat -u Administrator -a app2 -f c:\entities.gxz -o x

This command imports entities into the "app2" application (only if it exists), overriding any conflicting entities within the application.

importapp.bat -u Administrator -a app1 -f c:\app.gxar -o c

This command imports the host and application configuration, from the provided gxar file as a new application. The repository will be read-only.

importapp.bat -u Administrator -a app1 -f c:\entities.gxar -o h

This command retains the existing host configuration, and imports the "app1" application (entities and configuration) from the provided gxar file, overriding any conflicting entities within the application. The repository will be read-only.

importapp.bat -u Administrator -a app1 -f c:\entities.gxar -o r

This command imports the host configuration, and the "app1" application (just the configuration) from the provided gxar file, and imports the entities into the repository, using the existing repository configuration. The repository will not be read-only.

importapp.bat -u Administrator -a app1 -f c:\entities.gxar -o hr

This command imports the host configuration, retains the application configuration, and imports the "app1" application entities from the provided gxar file to the existing repository, overriding any conflicting entities within the application. The repository will not be read-only.

Administration using a Batch File

You can now perform various administration tasks from a command line using the tool gxadminconsole.sh (Linux) or gxadminconsole.bat (Windows) in the ApplinX utilities folder.

Syntax:

Administrator [Server address][Server port][User name][Password][Command]...[Parameters]

Start of instruction setTo get more information on the gxadminconsole utility

  • Enter command

    C:\SoftwareAG\ApplinX\utilities\gxadminconsole.bat -? 

The available commands are described below:

Sessions

Parameter Description
-gs [is filter(true/false)][column name][filter value] Sessions list
-sd[session ID] Session details by session ID
-cs [session ID] Cancel session
-scs [session ID] Session current screen

Examples

Start of instruction setTo get session details by session ID

  • Enter command

    C:\SoftwareAG\ApplinX\utilities\gxadminconsole.bat -sd U000001

Start of instruction setTo get a list of sessions

  • Enter command

    C:\SoftwareAG\ApplinX\utilities\gxadminconsole.bat -gs true "Session ID" "U000*"

Connection Pools

Parameter Description
-cpl Connection pool list
-sc [application name][connection pool name] Show connections
-stcp [application name][connection pool name] Start connection pool
-spcp [application name][connection pool name] Stop connection pool
-rtcp [application name][connection pool name] Restart connection pool
-sdcp [application name][connection pool name] Suspend connection pool
-cpi [application name][connection pool name] Connection pool details
-cd [application name][connection pool name][connection ID] Connection details
-cc [application name][connection pool name][connection ID] Connection cancellation

Example

Start of instruction setTo get connection details

  • Enter command

    C:\SoftwareAG\ApplinX\utilities\gxadminconsole.bat cd MyApplication MyConnectionPool 100

Server Logs

Parameter Description
-sll Server log list
-scsl Show current Server log
-ssl [log file name] Show Server log by name

Users

Parameter Description
-ul Users list

Groups

Parameter Description
-gl Groups list