You are on page 1of 52

TranzWare ITP

Administrator Guide

© 2008 Compass Plus Ltd. All rights reserved


© Compass Plus Ltd., 1996-2008

This document is the property of Compass Plus Ltd (hereinafter ‘Compass Plus’) and the
information contained herein is confidential. The information contained in this document, either in
whole or in part, must not be reproduced or disclosed to others or used for purposes other than
that for which it has been supplied, without Compass Plus’s prior written permission, or, if any part
hereof is furnished by virtue of a contract between Compass Plus and a third party, as expressly
authorized under that contract.

COMPASS+™, COMPASS PLUS™, TRANZWARE™


are registered trademarks of Compass Plus Ltd.

TW ITP - AG.ENG.2.5.2008
Contents

1 Revision History
.................................................................................................. 5

2 System Architecture
.................................................................................................. 6

3 Oracle Database Creation Parameters


.................................................................................................. 8

4 ITPService .................................................................................................. 9

4.1 Functionality
........................................................................................................ 10

4.2 Start........................................................................................................
Parameters 11

4.3 Setup
........................................................................................................ 12

4.3.1 Structure of
..........................................................................................
Directories 12

4.3.2 Itplogin.scr
..........................................................................................
File 13

4.4 Start........................................................................................................
ITPService 15

4.5 Stop........................................................................................................
ITPService 17

4.6 Obtain Working Status


........................................................................................................ 18

4.7 Obtain Version


........................................................................................................ 19

4.8 Delete
........................................................................................................
ITPService 20

5 CPI - TWCMS Application Server


.................................................................................................. 21

5.1 Functionality
........................................................................................................ 22

5.2 Start........................................................................................................
Parameters 23

5.3 Cpi2.config File


........................................................................................................ 24

5.4 Connections in Oracle


........................................................................................................ 29

5.5 ITC Upgrade


........................................................................................................ 30

5.6 Itplogin.scr File Setup


........................................................................................................ 31

6 CPI Licensing
.................................................................................................. 32

7 ITPCmd Utility
.................................................................................................. 33

7.1 Functionality
........................................................................................................ 34

7.2 Start........................................................................................................
Parameters 35

TW ITP - AG.ENG.2.5.2008 3
7.3 ITP Parameters
........................................................................................................ 36

7.4 ITPCmd Commands


........................................................................................................ 37

7.4.1 Copy Files/Directories


.......................................................................................... 38

7.4.2 Move or Remove Files/Directories


.......................................................................................... 39

7.4.3 View Directory


..........................................................................................
Contents 40

7.4.4 Test Connection


..........................................................................................
- Send/Receive Echo 41

7.4.5 Interface of
..........................................................................................
Line Requests to ITP 42

7.4.6 Monitoring.......................................................................................... 43

7.4.7 Send Message


.......................................................................................... 44

7.4.8 Inquire Information


..........................................................................................
on ITP Session 45

7.4.9 Execute ITPScript


..........................................................................................
Script File 46

7.4.10Change Password
.......................................................................................... 47

7.4.11Administrate
..........................................................................................
Users 48

7.5 ITPCmd
........................................................................................................
External Functions 49

7.6 Examples
........................................................................................................ 50

7.6.1 Example of
..........................................................................................
ITPCmd Start in Interactive Mode 51

7.6.2 Example of
..........................................................................................
ITPCmd Start with Command Execution 52

4 TW ITP - AG.ENG.2.5.2008
Revision History

1 Revision History

Description of Change Where to Look

An example of the itplogin.scr script file is added to ITPService:


the Examples | ITP_CMD directory.  Updated section: Itplogin.scr File
The cpi2.config configuration file is modified. The CPI - TWCMS Application Server:
support of CDIS is added.  Updated section: Cpi2.config File
The cpi2.exe file is modified. In the fs_access_dirs CPI - TWCMS Application Server:
parameter it becomes possible to enumerate  Updated section: Start Parameters
directories available for access.
CPI - TWCMS Application Server:
 Added section: CPI Licensing

TW ITP - AG.ENG.2.5.2008 5
System Architecture

2 System Architecture

TWCMS is implemented on basis of the terminal-server technology, i.e. the whole data
domain is executed on the application server. So, each operator's workstation has
Intellectual Terminal Client (ITC) installed. ITC does not interact with data stored in
the database and with TWCMS internal objects, it executes no functions. ITC only uses
ITP protocol (protocol used to display information on the screen) to interact with the
application server.
The application server has an ORACLE instance, where the whole data domain of the
complex is compiled. Alongside the ORACLE instance, there is a CPI module in
OS-depending part. CPI directly interacts with the terminal by means of the ITP protocol
and enables to refer to the database, at that it establishes a dual connection: 1
ORA-connection and 1 IP-connection.
ORA-connection
CPI does not directly interact with data stored in the database, either. This module
has no data domain, it is based only on ITP protocol via which it interacts with
outside and can activate the data domain start procedure, so-called package
JavaPort, that is present in the database.

6 TW ITP - AG.ENG.2.5.2008
System Architecture

In other words, after the connection to ORACLE is established, the system starts
package JavaPort which in essence organizes the server functioning.
IP-connection
IP connection is established.
After receiving information from ORACLE, CPI places it in ITP protocol and sends a
request to the terminal. The terminal identifies this request and reacts respectively:
displays some data on the screen, interacts with any terminal resources and with
outside. Inversely the server module receives events from the terminal (reaction to
pressed buttons, information entered to the fields and so on, including responses from
external devices).
Thus, CPI sees all the resources on the server (the whole file system of the server as
well as all the devices present on the server), at that it can work both with parallel and
successive ports, printers etc. In its turn, the ITC terminal sees all the resources on the
station (successive and parallel ports, printers etc.). The modules interaction results in
data exchange, i.e. when working in TWCMS complex it is possible to see and work both
with server and terminal resources.
Examples of how the terminal resources are used can be as follows: the disk subsystem
used to save information to files, a device used to change PIN code, e.g. PIN-PAD (the
information is sent to the server via ITP protocol and the server itself interacts with
HSM).
This method of operator-program interaction has the following advantages:
 First, it actually provides OS-independence, since the whole data domain is
implemented in the ORACLE stored procedures. The module in written in C++, its
size is not large and it can be easily transferred from one platform to another.
 Second, this method of interaction allows to considerably economize the
interaction traffic between the terminal and the server, what is especially
important on unstable connection lines.
 Thirdly, it provides security of data transfer. Even when channel hardware
encryption is absent, both sides have an option to encrypt or pack information (it
depends on the ITP protocol parameterization). At present two mechanisms of
data encryption are supported: DES and TRIPLE DES. The data package before
transfer has a great importance for production increase.
 Fourthly, it enables to increase the system fault tolerance. As the whole
application domain operates on the server, in case the connection is broken, the
module continues working and the operator has the possibility to re-connect.

TW ITP - AG.ENG.2.5.2008 7
Oracle Database Creation Parameters

3 Oracle Database Creation Parameters


The following Oracle parameters are recommended for TWCMS.
When creating the database, it is necessary to install "Java Server". The listener should
be started in the "Dedicated" mode.
If the database resides on the RAID array, it is recommended to set the stripe size equal
to 64 KB and the Oracle data block size equal to 8 KB. The redo-files size is ~ 5 MB,
number >=10-15. The Rollback Segments number is ~ 15 with the following
parameters: Initial = 2MB, Next = 2MB, MinExtents = 10.
The following table contains the recommended parameters of table spaces:
Name Type Extent management Stripe (KB), Size, MB
PCTINCREASE %
A4M Permanent Local management with uniform 64, 0 >=1024
allocation size
RBS Permanent DICTIONARY 512, 0 >=1024
TEMP Temporary Local management with uniform 64, 0 >=1024
allocation size
TOOLS Permanent DICTIONARY 64, 0 ~5
USERS Permanent DICTIONARY 64, 0 ~5
SYSTEM Permanent DICTIONARY 64, 50 >=350
INDEX Permanent DICTIONARY 64, 0

The following parameters of the init.ora file are recommended:


Open_cursors >=300;
Process ~ 200;
Log_buffer ~ 128 KB;
Sort_area_size ~ 1MB;
Sort_area_retained_size ~ 100 KB;
Enqueue_resources ~ 25000-30000;
SGA settings: ~ 30-40% of total memory capacity, where ~ 60-70% is buffer memory.

8 TW ITP - AG.ENG.2.5.2008
ITPService

4 ITPService
 Functionality
 Start Parameters
 Setup
 Structure of Directories
 Itplogin.scr File
 Start ITPService
 Unix
 Windows
 Stop ITPService
 Unix
 Windows
 Obtain Working Status
 Locally on Unix
 Locally on Windows
 Remotely
 Obtain Version
 Delete ITPServicе
 Unix
 Windows

TW ITP - AG.ENG.2.5.2008 9
ITPService

4.1 Functionality

ITP protocol is used to organize the interaction of objects (resources) in


terminal-to-host and host-to-terminal connections. ITP can operate over the networks
with secured (TCP/IP, X25) and unsecured (COM port) delivery of batches. The protocol
is symmetric and enables the requests of both sides to be initiated asynchronously.
Data can be encrypted and compressed when being transferred; to speed up the data
transfer, new network connections can be dynamically created.
Data are encrypted using symmetric algorithms, at present the DES and Triple DES
algorithms are supported. An encryption key is generated dynamically on the host at the
ITP session start. To transfer the encryption key to the terminal, the RSA algorithm is
used: a couple of RSA keys is generated on the terminal (public and private keys), the
public key is transferred to the host, the host uses it to encrypt the encryption key and
transfers the latter to the terminal, the terminal decrypts it using the private key.
To compress data, the DEFLATE (RFC 1951) algorithm is used (the same that is used by
ZIP).
New network connections can be either of terminal-to-host or host-to-terminal types.
After the data are transferred, the separate connection is closed.
The parameters of encryption, compression and separate connections are assigned by
comparing the list of permits of the terminal with that of the host. On basis of these lists
a subset is generated; it is used to select the most preferable value for the parameter.
Possible values:
 Encryption: DES, Triple DES, no encryption;
 Compression: Deflate, no compression;
 Separate connection: to server, to host, to terminal, no connection.
Beginning with ITP version 1.6.50, the watchdog is used. The watchdog purpose is as
follows: if no batch is received from a remote side during 30 seconds, the watchdog
batch is sent there. Then, watchdog batches are sent there every 10 seconds until the
return watchdog batch is received from the remote side. If the return batch is not
received during 2 minutes, the connection is broken.
ITP can operate on the following platforms: Windows NT (2000, 2003, XP), UnixWare 7,
SUN OS, Linux.

10 TW ITP - AG.ENG.2.5.2008
ITPService

4.2 Start Parameters

ITPService is an ITP network service for TCP/IP and X25 networks and connections via
the COM port. The ITPService functioning after the connection is established is
completely determined by the itplogin.scr script file written in the ITPScript language.
The creation of such file is described below.
A standard scenario includes the customer identification and the start of the respective
server application to which the identifier of the opened connection is transmitted. The
customer identification can be performed using either own file of passwords or OS
authorization. To perform OS authorization, the service process should have the
respective privileges in OS. The service can also provide the possibility to identify the
customer to the server application.
When functioning, ITPService can keep a run-time journal and a debug file. On
Windows NT (2000, 2003, XP), ITPService writes error messages to the system event
log, it also writes the run-time journal there if the respective option is enabled.

TW ITP - AG.ENG.2.5.2008 11
ITPService

4.3 Setup

4.3.1 Structure of Directories

ITPService does not require any rigid structure of directories on the disk. The structure
of directories depends on the server applications installed. All the settings are defined in
the itplogin.scr script file.

The itplogin.scr file must reside in the same directory as ITPService.

12 TW ITP - AG.ENG.2.5.2008
ITPService

4.3.2 Itplogin.scr File

Before starting ITPService, it is necessary to create the itplogin.scr script file (an
example of the file is included in the Examples | ITP_CMD distributive directory
supplied). The itplogin.scr file represents a program in the ITPScript language the
syntax of which is similar to that of the C language.
The processing of exception is supported. The ITPScript language enables to use
external functions and create own ones. The void main() function is an entry point.

When defining relative paths, it is necessary to consider that the ITPService current
directory resides in the same place as ITPService.

External Functions Provided by ITPScript


Function Description
char charAt(String str, int index); Returns the character in 'str' string by 'index'.
String substr(String str, int index, int len); String Returns the substring in 'str' string from 'index' position
substr(String str, int index); with 'len' length or up to the string end.
String strcat(String str1, String str2); Returns the result of 'str1' and 'str2' strings merging.
int strlen(String str); Returns the 'str' string length.
String tolower(String str); Converts a string into the lower case.
String toString(int num); Converts a number into a string.
int getExceptionNo(); Returns the identifier of the last exception.
String getExceptionStr(); Returns the text of the last exception.
String showMessage(String title, String msg); Sends a message to the terminal.
String showErrorMessage(String title, String msg); Sends an error message to the terminal.
String showWarningMessage(String title, String Sends a warning to the terminal.
msg);
void sleep(int timeout); Delays the script execution for the number of
milliseconds specified.
void exit(); Ends the script execution.

External Functions Provided by ITPService


Function Description
String stringInterface(String requst); ITP interface.
String makeArgument(String arg); Packs the argument for 'stringInterface()'.
String getArgument(); Unpacks the argument for 'stringInterface()'.
void exec(String prog, String dir); Starts ITP server application. 'Prog' is a command with
arguments, 'dir' is the current directory for the
application.
void osLogonAndExec(String prog, String dir); Executes the user authorization in OS and starts ITP
void osLogonAndExec(String prog, String dir, int server application. The arguments are the same as in
attempts); 'exec()' function. 'Attempts' means the maximum
number of attempts (by default 3).
void ownAccountsManage(String home, String Starts the user manager. 'Home' is the directory for user
passwordFile, String user); home directories, 'passwordFile' is the file with user
passwords, 'user' is the current user name.
void ownLogon(String passwordFile); void Executes authorization using own file with passwords.
ownLogon(String passwordFile, int attempts); 'PasswordFile' is the own file with passwords, 'attempts'
is the number of attempts (by default 3).
String getHostName(); Returns the host name.
void osLogon(); void osLogon(int attempts); Executes the user authorization in OS. 'Attempts' means
the maximum number of attempts (by default 3).
void reattach(); Is used in the course of OS authorization. Searches for
ITP server applications already started by the user and
offers the user to connect to one of them.

TW ITP - AG.ENG.2.5.2008 13
ITPService

void becomeUser(String userName); Only for Unix: changes the user context for connection.
void showStatus(); Displays the message of ITPService working status on
the terminal (see Obtain Working Status).

14 TW ITP - AG.ENG.2.5.2008
ITPService

4.4 Start ITPService

 Unix
 Windows NT (2000, 2003, XP)

Unix
On Unix, ITPService functions as a process: daemon.
Start parameters:
itpsrv run <netargs> [-log <file>] [-dbg <file>] [-console]
Parameters:
1. <netargs> - network parameters:
 tcp <port> [-gate <netmask>] - the parameters of working over the
TCP/IP network:
-- <port> - TCP/IP port number. The maximum value is 65536.
-- -gate <netmask> - TCP/IP network mask for local connections; for
other connection types: the customer program connects to the
ITPService port, after that ITPService transfers the descriptor of the
connection established to the customer program via the named
channel.
 comm <<name>:<speed>:<bits>:<parity>:<stop>:<flow>> - the
parameters of working via the COM port:
-- <name> - COM port name.
-- <speed> - data transfer rate (2400, 9600, 19200 …).
-- <bits> - bits per character (7, 8).
-- <parity> - parity check: N – no check; O – odd, E – even.
-- <stop> - stop bits (1, 15, 2).
-- <flow> - flow control: N – no control, H – hardware, S – software.
2. -log <file> - the name of the file containing the run-time journal.
3. -dbg <file> - the name of the file containing the debug information. 'Stdout' and
'stderr' names mean the data display on the screen.
4. -console – start as a console application. If the option is disabled, start as
daemon.
To start ITPService automatically when starting Unix, it is necessary to place the file
with the script for starting ITPService to /etc/rc2.d directory.

Example of a script for starting ITPService:


setenv LD_LIBRARY_PATH <itpservice_dir>
<itpservice_dir>/itpsrv tcp 1234 -log <itpservice_logdir>/itpsrv
Parameters:
1. <itpservice_dir> - the directory where ITPService resides.
2. <itpservice_logdir> - the directory for the ITPService logs.

Windows NT (2000, 2003, XP)


On Windows, ITPService functions as OS service.
1. ITPService is installed by the following command:
itpsrv install [-name <name>] [-account <user>] <netargs> [-log]
[-dbg <file>]
Parameters:
 -name <name> - the name of the service for SCM (Windows Service

TW ITP - AG.ENG.2.5.2008 15
ITPService

Control Manager); if the value is not defined, 'ITPService' name is used.


 -account <user> - the name of the Windows user under which ITPService
will operate. If this option is defined, the user password will be inquired
additionally.
 <netargs> - the ITPService network parameters, see the <netargs>
parameter description.
 -log – the option enabling to write the run-time journal to the Windows
system event log; if this option is disabled, only error messages will be
written to the system event log.
 -dbg <file> - the command to write the debug messages to a file.
2. ITPService is started by the following command:
itpsrv start [-name <name>]
Parameters:
 -name <name> - the name of the service; if the value is not defined,
'ITPService' name is used.
3. To start ITPService as a regular program, the following command is used:
itpsrv run <netargs> [-dbg <file>]
Parameters:
 <netargs> - the ITPService network parameters, see the <netargs>
parameter description.
 -dbg <file> - the command to write the debug messages to a file.

16 TW ITP - AG.ENG.2.5.2008
ITPService

4.5 Stop ITPService

1. Unix
To stop ITPService, send SIGTERM signal to the ITPService process.
kill <itpservice_pid>

2. Windows NT (2000, 2003, XP)


ITPService is stopped by the following command:
itpsrv stop [-name <name>]
Parameters:
 -name <name> - the service name; if the value is not defined, 'ITPService'
name is used.

TW ITP - AG.ENG.2.5.2008 17
ITPService

4.6 Obtain Working Status

1. Locally on Unix
Unix has no own facilities to obtain the ITPService working status; for this
purpose 'ps' command is used:
ps –ef | grep itpsrv

2. Locally on Windows NT (2000, 2003, XP)


To obtain the ITPService working status, the following command is used:
itpsrv status [-name <name>]
Parameters:
 -name <name> - the service name; if the value is not defined, 'ITPService'
name is used.

Example of the status displayed:


The service is running, PID 1008
Start time : 2001/11/21 19:18:36
Kernel time : 00:00:01
User time : 00:01:17
Owner : EXCHANGE\itp_service
Group : EXCHANGE\None

3. Remotely
The ITPService working status can be obtained either remotely or locally, from
the server. To obtain the status via the network, it is necessary to perform as
follows: in the itplogin.scr file define the showStatus() function start (see External
Functions) by the TARGET environmental variable value on the terminal, e.g.
'STATUS'. At that, a message similar to the following one will be received from the
server:
Machine/OS information :
Machine name ............ EXCHANGE
Platform .................... Microsoft Windows 2000, Advanced Server
OS version ................ 5.0.2195, Service Pack 2
Processors count ........ 1
ITPService times :
Start time ................. 2001/12/03 14:57:28
Kernel time ............... 00:00:00
User time .................. 00:00:07
ITPService security :
Owner ...................... EXCHANGE\itp_service
Group ...................... EXCHANGE\None
Counters :
Serviced connects ..... 13
Success OS logons .... 0
Success own logons .. 7
Executed programs ... 7
Reattaches ............... 0
Errors ...................... 0
Running applications :
Process id 680, path itpcmd.exe, start time 12/03 15:35:29

18 TW ITP - AG.ENG.2.5.2008
ITPService

4.7 Obtain Version

The ITPService version is obtained by the following command:


itpsrv version

TW ITP - AG.ENG.2.5.2008 19
ITPService

4.8 Delete ITPService

1. Unix
To prohibit the ITPService autostart, delete the respective script from /etc/rc2.d
directory.

2. Windows NT (2000, 2003, XP)


On Windows NT(2000, 2003, XP), ITPService is deleted by the following
command:
itpsrv remove [-name <name>]
Parameters:
 -name <name> - the service name; if the value is not defined, 'ITPService'
name is used.

20 TW ITP - AG.ENG.2.5.2008
CPI - TWCMS Application Server

5 CPI - TWCMS Application Server


 Functionality
 Start Parameters
 Cpi2.config File
 Connections in Oracle
 ITC Upgrade
 Itplogin.scr File Setup

TW ITP - AG.ENG.2.5.2008 21
CPI - TWCMS Application Server

5.1 Functionality

CPI is an intermediate between ITC terminals and TWCMS in Oracle database.


CPI functionality:
1. TWCMS application server:
 Create sessions in Oracle and provide data exchange between sessions and ITC
terminals.
 Organize session pool in Oracle.
 Provide Oracle sessions with access to the host resources.
 Restore the session after the ITC terminal is reconnected.
 Transfer data between different CPI in the course of monitoring and chat.
 Provide file service to upload ITC distribution kit to the host.
 Provide file service to upgrade ITC.
2. Provide ITP, TCP/IP services for TranzWare Online.
 Create sessions in Oracle and provide secure data exchange between sessions
and TranzWare Online. To secure TCP/IP connections, SSL is used.
 Organize session pool in Oracle.

22 TW ITP - AG.ENG.2.5.2008
CPI - TWCMS Application Server

5.2 Start Parameters

CPI can be started by a command line, ITPService or as a separate server application.


Start arguments:
Unix:
cpi2 [itp_options] [-host_interface] [-images_cache_size <size>]
[-upload_term_distrib <password_file>] [-term_distrib_dir <distrib_dir>][
-fs_access_dirs]
Windows:
cpi2 [itp_options] [cpi_command] [-host_interface] [-images_cache_size
<size>] [-upload_term_distrib <password_file>] [-term_distrib_dir
<distrib_dir>][-fs_access_dirs]
Parameter Description
itp_options See the ITPCmd Utility section.
cpi_command install [-name <name>] [-acc <user>] [cpi_options]
installs service for working under <user> account (by default - LocalAccount)
– only for Windows NT;

remove [-name <name>]


removes service – only for Windows NT;

start [-name <name>]


starts service – only for Windows NT;

stop [-name <name>]


stops service – only for Windows NT;

status [-name <name>]


view service working status – only for Windows NT;

For all commands <name> - the service name (by default CPIService)
-host_interface Enables CPI to work as online service v1.
-images_cache_size Disk space (bytes) for image caching.
<size>
-upload_term_distrib Starts CPI in order to update ITC distribution kit on the host. <password_file>
<password_file> - the file containing passwords of the users having rights to perform this
operation.
-term_distrib_dir Orders CPI to upgrade ITC from the specified directory containing ITC
<distrib_dir> distribution kit.
-fs_access_dirs Starting with CPI version 2.4.14. it is possible to regulate access to host
directories.

When using the [-fs_access_dirs] parameter it is allowed to access all


directories on the host. This variant should be used only on the administrator's
responsibility.

If the [-fs_access_dirs] parameter is not used in the CPI starting arguments,


it is prohibited to access all directories on the host except the directory from
which the service is started and its sub-directories nested.

If the CPI version is lower than 2.4.14, it is allowed to access all the
directories on the host.

TW ITP - AG.ENG.2.5.2008 23
CPI - TWCMS Application Server

5.3 Cpi2.config File

Along with the command line, CPI parameters can be defined in the cpi2.config
configuration file of XML format (for details of the XML file structure refer to the TWCMS.
File Structures specification).
This file must reside in the same directory as CPI program. If the cpi2.config file is not
present in the directory, when starting CPI only start parameters are used.
Since the name of the cpi2.config file is case sensitive, when naming the file for SUN
Solaris it is necessary to use the upper case: CPI2.config.
The following table illustrates the file structure:
Tag/Attribute Terminal variable Description
Tag "Config" General settings.
Attribute "Mission" СPI functionality:
 APP_SERVER – TWCMS application server (default
value) that serves ITC terminal connections.
 ONLINE_SERVICE1 – out of date, similar to
–host_interface parameter.
 ONLINE_SERVICE2 – provides other programs with
network access to TWCMS, e.g. TranzWare Online.
When using ONLINE_SERVICE2 it is necessary to
define the connection destination in Attribute "InitParams"
.
Attribute "Protocol" Data transfer protocol:
 ITP_DIALOG - data are transferred via ITP_DIALOG
resource (default value);
 ITP_PORT - data are transferred via ITP_PORT
resource;
 TCP - data are transferred via TCP/IP connection;
 TCP_SSL - data are transferred via TCP/IP connection
and SSL protocol.
Attribute "AloneService"  FALSE – CPI is started by ITPService (default value);
 TRUE – CPI functions as a separate service.
Attribute "BaseAlias" Connections / Oracle database name for connection.
<Connection>
/ Oracle database
name
Attribute "User" inquired if it is not
User in Oracle database, created in TWCMS. For Batch
defined in CPI Processor it is necessary to use a separate special TWBP
settings user.
Attribute "Password" Password in Oracle database.
Attribute "Language" Terminal / Language ITC terminal message language:
 ENGLISH (default value);
 RUSSIAN.
Attribute "Reattachable" Connections /  FALSE - in case the connection is broken the session is
<Connection> / closed (default value);
Application / Option  TRUE - in case the connection is broken the session can
to reconnect the be continued after reconnecting.
session
Attribute Terminal / Enables to keep sessions opened after they are terminated
"MaxIdleSessions" Application / until the number of such sessions reaches the number
Maximum number of specified in Oracle in order to use them again when it is
inactive sessions necessary to create a new session with similar initialization
parameters.
For Batch Processor the attribute MaxIdleSessions=0,
otherwise the blocking error occurs.
For statements and TW CDIS MaxIdleSessions must differ
from 0.
By default - 0.

24 TW ITP - AG.ENG.2.5.2008
CPI - TWCMS Application Server

Attribute Terminal / Period of time in minutes after which an unclaimed


"SessionIdleTimeout" Application / Inactive inactive session in Oracle is closed. It makes sense only in
session lifetime case MaxIdleSessions != 0.
-1 - no limits (default value).
Attribute Disk space to store files with images.
"ImagesCacheSize" -1 - no limits (default value).
Tag "Config/ Service" Service configuration.
Attribute "Log"  FALSE (default value);
 TRUE – register connections to the Windows system log.
Attribute "DebugFile"  FALSE (default value);
 TRUE - create debug file with the name specified.
Tag "Config/ Service/ Describes ports to be served by the service. For
Ports" statements it is possible to enumerate ports in the same
service.
Tag "Config/ Service/ Describes a port to be served by the service.
Ports/ Port"
Attribute "Num" Port No.
Attribute "InitParams" Parameters of Oracle session initialization.
Format: "XXX <branch>_<branchpart>_<station>"
Where:
 ХХХ - connection destination:
-- For Batch Processor: FLORA
-- For CoreBanking interface (to obtain online
statements and TW CDIS): FIMI.
 <branch> – the branch No. The value of this
parameter is defined in personal settings of TWCMS.
(Personal Settings | Connections (select your
connection) | Application | Branch No).
 <branchpart> – the number of the branch being used.
The value of this parameter is defined in the
Dictionary of Branches (TWCMS | Start | Dictionaries
| Dictionary of Branches).
 <station> – the station No. The value of this
parameter is defined in personal settings of TWCMS.
(Personal Settings | Application | Station No).
Attribute "Algorithms" Possible algorithms for SSL working:
DES 3DES AES_128 AES_256 RC2 RC4 RSA_KEYX
DH_KEYX DHE_KEYX DSS_SIGN RSA_SIGN SHA1 MD5
Tag "Config/ Service/ Own certificate used to authenticate the server by the
Port/ Certificate" customer (used for TCP_SSL protocol).
Attribute "CommonName" Certificate name.
Tag "Config/ Service/ List of trusted certificates used to authenticate customers.
Port/ If this tag is present in the configuration, CPI
TrustedCertificates" authenticates customers (used for TCP_SSL protocol).
Tag "Config/ Service/ Certificate used to authenticate a customer (used for
Port/TrustedCertifica- TCP_SSL protocol).
te /Certificate"
Attribute "CommonName" Certificate name.
Attribute "SerialNumber" Certificate serial No, assigned by Certification Authority
Center.
Attribute "Issuer" Name of Certification Authority Center that issued the
certificate.
Tag "Config/ Describes Upgrade of ITC terminal.
TermUpgrade"
Attribute "UploadTask" Connections /  FALSE (default value);
<Connection> /  TRUE – ITC program is uploaded to the host.
Application /
Connection purpose
= "UPLOAD_TERM_
DISTRIB"
Attribute  FALSE (default value);
"DownloadEnabled"  TRUE – Upgrade of the ITC terminal from the host is
allowed.

TW ITP - AG.ENG.2.5.2008 25
CPI - TWCMS Application Server

Attribute "PwdFile" File containing passwords of the users that can upload ITC
program to the host (similar to -upload_term_distrib
parameter).
Attribute "DistribDir" Directory containing program for ITC Upgrade (similar to
-term_distrib_dir parameter).

Service Setup
1. Set up cpi2.config file.
This file must reside in the same folder as the cpi2.exe file.
An example of a configuration file for Online service see below.
2. Install cpi2.exe as service.
To perform it, the сpi2.exe and cpi2.config files must reside in a separate
directory, but not in the directory where the сpi2.exe file used for access to
TWCMS of ITC terminals resides. The parameters of the cpi2.config file for Batch
Processor differ from the parameters for statements and TW CDIS, therefore files
for Batch Processor must reside in another directory and be performed by a special
service.
Installation is performed by the following command:
cpi2.exe install
The command installs the service under 'CPIService' name.
3. Start the service.
After CPIService is successfully installed, it is necessary to start it.
CPIService is started by the following command:
cpi2.exe start
4. In TranzWare Online it is necessary to perform the following settings:
 Load Core Banking Authorizer driver to TranzWare Online Instance.
 Set up Core Banking authorizer to the required address and port.
 Define name of Core Banking host user (Login).

An example of a configuration file for Online access to TWCMS:


1. for service of Online access to TWCMS to obtain Online statements:
<?xml version="1.0" encoding="utf-8"?>
<Config AloneService="TRUE"
User="a4m"// name of the user registered in TWCMS
Password="a4m"// user password
Mission="ONLINE_SERVICE2" // CPI task
BaseAlias="Y_175"// database name (tns name)
MaxIdleSessions="1"// size of Oracle connections cache
Language="ENGLISH">// terminal message language
// debug file
<Service DebugFile="cpiservice.dbg">
// description of served TCP/IP ports
<Ports>
// description of the port to be served by the service
<Port
Num="1238" // port No
Protocol="TCP_SSL"// data transfer protocol
// possible algorithms for SSL working
Algorithms="DES 3DES AES_128 AES_256 RC2 RC4 RSA_KEYX
DH_KEYX DHE_KEYX DSS_SIGN RSA_SIGN SHA1 MD5"
InitParams="FIMI 1_1_1">// parameters of Oracle session initialization

26 TW ITP - AG.ENG.2.5.2008
CPI - TWCMS Application Server

(for details refer to the table)


// own certificate used to authenticate the server by the customer (for
TCP_SSL protocol) and to encode data being transferred
<Certificate CommonName="cpi"/>
<TrustedCertificates>// certificates used to authenticate customers (for
TCP_SSL protocol)
<Certificate
CommonName="two"
SerialNumber="12AB12E211"
Issuer="Test CA"/>
</TrustedCertificates>
</Port>
</Ports>
</Service>
</Config>

2. for service of Batch Processor Online access to TWCMS:


<?xml version="1.0" encoding="utf-8"?>
<Config AloneService="TRUE"
User="TWBP"// name of the user registered in TWCMS
Password="TWBP"// user password
Mission="ONLINE_SERVICE2" // CPI task
BaseAlias="Y_175"// database name (tns name)
MaxIdleSessions="0"// size of Oracle connections cache
Language="ENGLISH">// terminal message language
// debug file
<Service DebugFile="cpiservice.dbg">
// description of served TCP/IP ports
<Ports>
// description of the port to be served by the service
<Port
Num="1239" // port No
Protocol="TCP"// data transfer protocol
InitParams="FLORA 1_1_1"> // parameters of Oracle session initializat
ion (for details refer to the table)
</Port>
</Ports>
</Service>
</Config>

3. For access to TW CDIS:


<?xml version="1.0" encoding="utf-8"?>
<Config AloneService="TRUE"
User="a4m"// name of the user registered in TWCMS
Password="a4m"// user password
Mission="ONLINE_SERVICE2" // CPI task
BaseAlias="Y_175"// database name (tns name)
MaxIdleSessions="1"// size of Oracle connections cache
Language="ENGLISH">// terminal message language
// debug file
<Service DebugFile="cpiservice.dbg">
// description of served TCP/IP ports
<Ports>

TW ITP - AG.ENG.2.5.2008 27
CPI - TWCMS Application Server

// description of the port to be served by the service


<Port
Num="1240" // port No
Protocol="TCP_SSL"// data transfer protocol
// possible algorithms for SSL working
Algorithms="DES 3DES AES_128 AES_256 RC2 RC4 RSA_KEYX
DH_KEYX DHE_KEYX DSS_SIGN RSA_SIGN SHA1 MD5"
InitParams="FIMI 1_1_1">// parameters of Oracle session initialization
(for details refer to the table)
// own certificate used to authenticate the server by the customer (for
TCP_SSL protocol) and to encode data being transferred
<Certificate CommonName="cpi"/>
<TrustedCertificates>// certificates used to authenticate customers (for
TCP_SSL protocol)
<Certificate
CommonName="two"
SerialNumber="12AB12E211"
Issuer="Test CA"/>
</TrustedCertificates>
</Port>
</Ports>
</Service>
</Config>

28 TW ITP - AG.ENG.2.5.2008
CPI - TWCMS Application Server

5.4 Connections in Oracle

CPI establishes a new connection in Oracle every time a new TWCMS application is
started. In order to cut the time required to start a new application with similar settings
on the ITC terminal (see TWCMS main documentation: ITC - Intellectual Terminal
Client section) sessions are cached in Oracle. It means that when a TWCMS application
is closed, CPI does not close the session in Oracle on the instant, but puts it into the
session cache. The cache can include the number of sessions not exceeding that
determined by the Maximum Number of Inactive Sessions ITC parameter. The
inactive session lifetime expires when new sessions are cached or according to the
Inactive Session Lifetime ITC parameter.

The more detailed information on ITC parameters can be obtained in TWCMS main
documentation: ITC Settings section.

TW ITP - AG.ENG.2.5.2008 29
CPI - TWCMS Application Server

5.5 ITC Upgrade

CPI provides an option to upgrade ITC. It is performed as follows:


1. The administrator receives a regular TWCMS Upgrade including the ITC
installation file: itcsetup.exe.
2. The administrator installs new ITC version on his station.
3. The administrator uploads the ITC distribution kit to the host, using the ITC
terminal installed.
4. When connecting to the host next time, a TWCMS operator is proposed to upgrade
the ITC terminal.
5. If confirmed, ITC is automatically upgraded and restarted on this station.

ITC Upgrade Setup


To perform ITC upgrade setup, the administrator should follow the stages:
1. Create a directory for ITC distribution kit on the host with ITPService installed.
2. Create a file with the password for ITC distribution kit upgrade, using itppasswd
utility. The file should contain at least one record of the following type: <user
name>-<password cache>.
3. In the section of settings of itplogin.scr file define the permission to upgrade ITC
terminals, path to the directory with the ITC distribution kit and to the file with the
password for ITC distribution kit upgrade (see Itplogin.scr File Setup).
4. Upload ITC distribution kit to the host. In personal connections, the administrator
should create a new connection and define as follows:
 <New connection> section
- Name
- Address of TPI/IP host address
- No of remote TPI/IP port
 <Application> section
- Connection destination: UPLOAD_TERM_DISTRIB
- Application: Working mode
- Name of Oracle database. Do not fill this field.

When selecting the connection it is necessary to define the user name and
password for ITC distribution kit upgrade (see Item 2).

30 TW ITP - AG.ENG.2.5.2008
CPI - TWCMS Application Server

5.6 Itplogin.scr File Setup

To set up the itplogin.scr file it is necessary to find there the section of settings that
resides in the beginning of 'main' function and define the respective parameters there.

Example of settings:
//************Setup************
// Oracle home directory
String oracle_home = "c:\\Oracle";
// Path to CPI
String cpi = "cpi4.exe";
// Debug file Extract/Refresh
String extref_dbg = "c:\\exchange.dbg";
// Use ITC Upgrade
bool itc_upgrade = true;
// Path to ITC distribution kit
String itc_home = "c:\\a4m\\itc";
// File containing password for ITC distribution kit upgrade
String itc_pwd = "c:\\a4m\\bin\\itc.pwd";
//*************************************

TW ITP - AG.ENG.2.5.2008 31
CPI Licensing

6 CPI Licensing
TWCMS software is protected from illegal copying by means of Guardant electronic keys.
An electronic key represents a device hardwired to parallel (LTP) or USB port of a
computer. For TWCMS, only server electronic keys are used that are installed on the
servers the ITPService application is started from.
Generally, the scheme is as follows:
 The application is tied to the key using special software.
 When being started, CPI reads the key identifier from the Licenses.xml file and
exchanges the obtained data with the key to identify it.
 If the key is absent or has incorrect parameters, the CPI application does not
function.
To install an electronic key perform as follows:
1. Plug the key in the respective computer port.
2. Start the instdrv.exe file; the file comes with the TWCMS software.
3. Restart the computer. If the USB key is successfully installed, the indicator on the
key reverse side must light up.
The Licenses.xml file comes with Upgrade and must reside in the directory from which
ITPService is started. For example, C:\CPI2\NT\BIN. If such file is absent in the
directory, the system generates an error message and stops starting CPI.
The Licenses.xml file contains as follows:
 identifiers of keys <Key Id>
 license expiration date <Expiration>
 number of instances <Instances>
 trial group to support ITC functioning during 60 minutes in case the key is absent
<LicenseGroup Name="Trial">
The Licenses.xml file is view-only and protected by an electronic digital signature.
The trace of the key (license) working can be obtained in the host debug file.
The keys are programmed and supplied by Compass Plus.

32 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7 ITPCmd Utility
1. Functionality
2. Start Parameters
3. ITP Parameters
4. ITPCmd Commands
5. ITPCmd External Functions
6. Examples

TW ITP - AG.ENG.2.5.2008 33
ITPCmd Utility

7.1 Functionality

ITPCmd is an ITP command processor as well as an ITP server application providing


access to ITP basic resources: files, directories, environment, ITP applications. ITPCmd is
mainly used as an ITP file service and a facility providing access to ITP file service.

34 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.2 Start Parameters

1. Execute ITPCmd command.


itpcmd [-itp <itp_opts>] <command>
Parameters:
 <itp_opts> - ITP Parameters;
 <command> - ITPCmd Command.
2. Execute ITPCmd command processor.
A user can input ITP commands (see ITPCmd Commands) to a command line.
itpcmd [-itp <itp_opts>] shell
3. Start ITPCmd as a server application.
itpcmd [-itp <itp_opts>] host [-daemon] [-security] [-log file]
Parameters:
 -daemon – start as a service process, not from the console;
 -security – an option to control access to files and directories. If this option
is enabled, ITPCmd does not let using absolute paths to files and directories
as well as relative paths having passages upward (..)
 -log file – keep records in the log file.

TW ITP - AG.ENG.2.5.2008 35
ITPCmd Utility

7.3 ITP Parameters

ITP parameters can be defined in the command line and 'itp' environment.
ITP parameter format is as follows: 'parameter=value {parameter=value}':
Parameter/ Syntax Description
(default value)
o (mandatory) h|t Defines the program role: 'h' - host, 't' - terminal.
c (mandatory) pipe | tcp(<port>) | Defines the network connection parameters:
tcp(<address>:<port>) |  pipe – the network connection descriptor, it is
comm(<name>:<speed>: transferred by ITPService via pipe;
<bits>:  tcp([address:]<port>) – the program is waiting for
<parity>:<stop_bits>: connection to TCP/IP <port> port, where:
<flow_ctl>) | eicon(<c |  address - TCP/IP address to wait for connection;
l>:<x25address>) | if it is not specified, the first available network
script(<script_file_name>) interface on the computer is used
 port - TCP/IP port to wait for connection
Parameters in square brackets [ ] are not mandatory.
 tcp(<address>:<port>[:<proxy_address>:<proxy_po
rt>] – the program connects to the address and
TCP/IP port specified, where:
 address - TCP/IP address or name of the host to
be connected
 port - TCP/IP port of the host to be connected
 proxy_address - TCP/IP address or name of the
proxy server
 proxy_port - TCP/IP port of the proxy server
Parameters in square brackets [ ] are not mandatory.
 comm – RS232 port is used as a network;
 eicon – ITP functions over X25 network via Eicon card:
<c> - receives connection to <x25address> address,
<l> - establishes connection to <x25address>
address;
 script – the connection is established as a result of the
script functioning in the IPScript language.
p (n) n|y For the server: enables to create control channel for
external requests; 'y' - create, 'n' - do not create.
s (nsht) n, s, h, t Enables to use separate connections: 'n' - do not use, 's' -
to server, 'h' - to host, 't' - to terminal.
z (nd) n, d Enables to use compression: 'n' - no compression, 'd' -
deflate.
y (ndt) n, d, t Enables to use encryption: 'n' - no encryption, 'd' - DES, 't'
- Triple DES.
w (n) n|y Enables to use watchdog: 'y' - use, 'n' - do not use.
a <user>/<password> Defines the name and password for connection.
e <name>:<value> Adds ITP environment variable, can include several
options.
d <debug_file> | stdout | Defines the debug file; 'stdout' and 'stderr' mean the data
stderr are displayed on the screen.

36 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.4 ITPCmd Commands

 Copy Files/Directories
 Move or Remove Files/Directories
 View Directory Contents
 Test Connection - Send/Receive Echo
 Interface of Line Requests to ITP
 Monitoring
 Send Message
 Inquire Information on ITP Session
 Execute ITPScript Script File
 Change Password
 Administrate Users

TW ITP - AG.ENG.2.5.2008 37
ITPCmd Utility

7.4.1 Copy Files/Directories

1. Copy to any direction.


copy [-retrans] [-recursive] [-ignore_absent] [-tmp] <source>
<target>

2. Download file from the server.


get [-retrans] [-recursive] [-ignore_absent] [-tmp] <source> [target]

3. Upload file to the server.


put [-retrans] [-recursive] [-ignore_absent] [-tmp] <source> [target]

Parameters for all the operations listed:


 -retrans – append the file contents. If the target file already exists, its CRC16
control amounts are compared with the beginning of the source file. If the control
amounts are identical, the file contents are appended, otherwise the file is
transferred entirely;
 -recursive – transfer the contents of the encountered directories;
 -ignore_absent – ignore the source file absence;
 -tmp – copy to a temporary file with the '.trans' extension, then rename to the
target file;
 source, target – masks of the source and target files. In 'copy' command the
'host://' prefix is used to specify local paths. A name with no prefix means the
path is remote. In get and put commands it is not necessary to define the prefix.

38 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.4.2 Move or Remove Files/Directories

1. Move files and directories.


move [-ignore_absent] <source> <target>
Parameters:
 -ignore_absent – ignore the source file absence;
 source, target – masks of the source and target files, the 'host://' prefix is
used to specify local paths. Source and target files should be both local or
remote.
 -tmp – when moving through the network – copy to a temporary file with
the '.trans' extension, then rename to the target file.
2. Remove files and directories.
remove [-recursive] [-ignore_absent] <path>
Parameters:
 -recursive – remove the contents of the encountered directories;
 -ignore_absent – ignore the absence of the files being removed;
 path - the file mask, the 'host://' prefix is used to specify a local path.

TW ITP - AG.ENG.2.5.2008 39
ITPCmd Utility

7.4.3 View Directory Contents

dir [-long] [-recursive] [path]


Parameters:
 -long – display extended information, file attributes, last modification date, size,
owner;
 -recursive – enter the encountered directories;
 path – the file mask, the 'host://' prefix is used to specify a local path.

40 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.4.4 Test Connection - Send/Receive Echo

echo [-reattach]
Parameters:
 -reattach – for 'reattach' testing, it is activated on the host.

TW ITP - AG.ENG.2.5.2008 41
ITPCmd Utility

7.4.5 Interface of Line Requests to ITP

The interface of line requests to ITP, the answer is displayed on the screen.
si <command1> [command2 ...]
Parameters:
 command – the line request.

42 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.4.6 Monitoring

Monitor an ITP application:


monitor <process_id>
Parameters:
 process_id – the process No.

TW ITP - AG.ENG.2.5.2008 43
ITPCmd Utility

7.4.7 Send Message

Send message to an ITP application:


message <process_id> <from> <msg>
Parameters:
 process_id – No of the process to which the message is sent.
 from – the sender name.
 msg – the message.

44 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.4.8 Inquire Information on ITP Session

info session
It is applied in ITP command processor.

TW ITP - AG.ENG.2.5.2008 45
ITPCmd Utility

7.4.9 Execute ITPScript Script File

The command enables to execute the ITPScript script file. External functions available to
be used in ITPScript can be obtained in ITPCmd External Functions section. The 'void
main()' function is an entry point.
script <script_file>
Parameters:
 script_file – the script file.

46 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.4.10 Change Password

The command enables a user to change his password on ITP server.


password

TW ITP - AG.ENG.2.5.2008 47
ITPCmd Utility

7.4.11 Administrate Users

accmgr
The command is used by an administrator to perform as follows:
 create new users on ITP server;
 change user password on ITP server;
 delete users on ITP server;
 view the list of users on ITP server.

48 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.5 ITPCmd External Functions

The list of external functions provided by ITPScript is described in ITPService section.


The following table contains the list of external functions provided by ITPCmd.
Function Description
void cd(String dir); Сhanges the current directory.
void mkdir(String dir); Creates a directory.
void rm(String path, bool recursive); Deletes files.
void copy(String dir1, String dir2, bool Copies files/directories. Arguments are the same as in copy
retrans, bool recursive, bool ignoreAbsent, command.
bool tmp);
void move(String dir1, String dir2, bool Moves files/directories. Arguments are the same as in move
retrans, bool ignoreAbsent, bool tmp); command.
void remove(String path, bool recursive, bool Removes files/directories. Arguments are the same as in
ignoreAbsent); remove command.
void dir(String path, bool recursive, bool Displays the directory contents on the screen. Arguments are
long); the same as in dir command.
void println(String msg); Displays the message line on the screen.
void printlnError(String msg); Displays the error message line on the screen.

TW ITP - AG.ENG.2.5.2008 49
ITPCmd Utility

7.6 Examples

 Example of ITPCmd Start in Interactive Mode


 Example of ITPCmd Start with Command Execution

50 TW ITP - AG.ENG.2.5.2008
ITPCmd Utility

7.6.1 Example of ITPCmd Start in Interactive Mode

An example of ITPCmd start in the interactive mode:


rem ITPHOST:1234 - address of ITP server for exchange
replace 'rem' with as follows: uuuuu - your user name , ppppp - your user password
itpcmd -itp "o=t c=tcp(ITPHOST:1234) a=uuuuu/ppppp e=TARGET:EXTR_REFR" shell

TW ITP - AG.ENG.2.5.2008 51
ITPCmd Utility

7.6.2 Example of ITPCmd Start with Command Execution

An example of ITPCmd start with command execution in repcopy.scr file:


rem ITPHOST:1234 - address of ITP server for exchange
Replace 'rem' with as follows: uuuuu - your user name , ppppp - your user password
itpcmd -itp "o=t c=tcp(ITPHOST:1234) a=uuuuu/ppppp e=TARGET:EXTR_REFR" script
repcopy.scr

Repcopy. scr File


An example of a file containing the file copying program (ITPCmd). Copy the "Report"
directory from the exchange server to 'C:\TMP' directory on the customer host. Proceed
to the "Report" directory and delete the files with the 'prs' extension (in the "Report"
directory).
void cd(String directory);
void mkdir(String directory);
void remove(String file, bool recursive, bool ignore_absent);
void copy(String source, String target, bool retrans, bool recursive, bool ignore_absent,
bool tmp);
void move(String file1, String file2, bool retrans, bool ignore_absent, bool tmp);
void dir(String path, bool recursive, bool long);
void println(String title);
void sleep(int pause);
String getExceptionStr();
void main()
{
copy("report", "host://c:\\tmp", true, true, true, false);
cd("report");
remove("*.psr", false, true);
}

52 TW ITP - AG.ENG.2.5.2008

You might also like