Professional Documents
Culture Documents
Technical Manual
A publication of:
Baan Development B.V.
P.O.Box 143
3770 AC Barneveld
The Netherlands
Printed in the Netherlands
© Baan Development B.V. 2001.
All rights reserved.
The information in this document
is subject to change without
notice. No part of this document
may be reproduced, stored or
transmitted in any form or by any
means, electronic or mechanical,
for any purpose, without the
express written permission of
Baan Development B.V.
Baan Development B.V.
assumes no liability for any
damages incurred, directly or
indirectly, from any errors,
omissions or discrepancies
between the software and the
information contained in this
document.
Document Information
Code: U7040F US
Group: User Documentation
Edition: F
Date: November, 2001
Table of contents
Technical Manual
i
Table of contents
Technical Manual
ii
Table of contents
Keys 6-9
Color support 6-12
To send colors separately 6-12
Colors in combination with code features 6-13
Parameterized strings 6-15
Example of terminal information files 6-17
Printer information files 6-22
Bar codes 6-27
Example of printer information file for the mt910 printer 6-30
7 User Interface (UI) page mode 7-1
Tab processing 7-2
Default Button handling 7-2
Event processing 7-2
How to select the UI page mode 7-4
How to mark UI objects as synchronizing fields 7-5
8 Customer-support tools 8-1
General 8-1
To log errors 8-1
Log file 8-1
Log-file layout 8-2
Log file maintenance 8-3
Submitting errors to customer support 8-3
Example error logging 8-4
9 Executable programs 9-1
Database management 9-1
General 9-1
Oracle 9-2
Sybase 9-2
Informix 9-2
DB2 9-3
Logic server (bshell) 9-3
Bshell6.2 9-3
To debug the bshell during run time 9-4
Memory usage 9-9
Miscellaneous 9-10
bshcmd6.2 9-10
badmin6.2 9-13
Installation 9-13
Development 9-14
License management 9-14
licd6.2 9-14
Technical Manual
iii
Table of contents
licmon6.2 9-15
Printer management 9-16
Shared memory 9-17
Network 9-17
TRITON Super Set 9-18
Time zone utilities 9-20
Middleware 9-20
UNIX equivalents 9-20
Miscellaneous 9-21
10 Errors 10-1
General 10-1
UNIX errors 10-1
Database errors 10-4
11 Shared memory management 11-1
General 11-1
To use the shared memory manager 11-1
Installation of shared memory 11-2
To create an entry in the shm_param file 11-2
Determine shared-memory parameters 11-3
To use shmvalues6.2 11-3
To use shmmanager6.2 11-4
To fill the entry in the shm_param parameter file 11-5
To install shared memory 11-6
To start shmtimer6.2 11-6
Error messages during installation 11-7
Syntax srdd_tab 11-9
To fill shared memory 11-10
Kernel requirements 11-11
General description of adjusting UNIX kernels 11-11
Kernel parameters 11-12
General kernel parameters 11-17
Example file shm_param parameter 11-18
12 Remote databases 12-1
General 12-1
Settings for remote database configurations 12-2
Local host 12-3
Remote 12-4
Local 12-4
tabledef6.2 12-5
User files 12-5
Remote 12-7
Technical Manual
iv
Table of contents
Technical Manual
v
Table of contents
Technical Manual
vi
About this document
This document is a reference guide explaining how you can customize the
BaanERP application for use by specific organizations. It is intended for
BaanERP application developers and application managers. You can use this
reference guide to set up and maintain a BaanERP application.
In this document you will find information about database tools and
management, audit management, native language support, and terminal
information, as well as some limited installation instructions.
Chapter 1, “Installing BaanERP Windows (BW),” describes how to install
BaanERP Windows (BW). This assumes that you already have BaanERP
installed on the server.
Chapter 2, “BI server,” summarizes how to install the BaanERP Internet Server
application, which is used as a gateway between the BaanERP Internet client
(BI) and the BaanERP application server (bshell), to expose the BaanERP
functionality to the Internet domain.
Chapter 3, “Database tools,” describes tools you can use for the following tasks:
Convert a database table to a sequential file (bdbpre)
Create a database table from a sequential dump or append data to an existing
database table (bdbpost)
Reconfigure a database table according to a new data dictionary
(bdbreconfig)
Check or repair the referential integrity within the database (refint)
Chapter 4, “Database management,” discusses the working and usage of several
protocols that can be used for local and remote communication.
Chapter 5, “Native language support,” describes the communication between the
character set of a terminal and that of bshell6.2.
Chapter 6, “Information files,” describes terminal information files, which store
information such as the type of terminal, terminal operations, how to access keys
on the keyboard, color support, cursor movements, and whether code features are
blinking, bold, or reversed.
Technical Manual
vii
About this document
Chapter 7, “User Interface (UI) page mode,” describes the User Interface (UI)
page mode in BaanERP. In normal mode, the 4GL Engine validates the entered
data per field. In the UI page mode, the 4GL Engine validates data per page
rather than per field. The synchronous interaction between the UI driver and the
bshell is therefore significantly reduced, which improves response times.
Chapter 8, “Customer support tools,” describes two functions used to solve errors
in a bshell environment: error logging and the bserel6.2 program. Error logging
is to keep a record of error messages in a log file. The bserel6.2 program
provides information on the BSE environment as installed on your system.
Chapter 9, “Executable programs,” describes all of the executable programs used
for database management.
Chapter 10, “Errors,” describes all the errors that can occur when you are
working in the BaanERP environment, and offers a solution.
Chapter 11, “Shared memory management,” discusses shared memory, which is
a part of the internal memory intended for common usage.
Chapter 12, “Remote databases,” explains how the BaanERP client/server
architecture enables the user to work with databases distributed over one or more
systems.
Chapter 13, “Multibyte Management,” explains how to use the 32-bit wide
character space, which has been implemented in BaanERP Tools to support all
possible character sets.
Chapter 14, “Audit Management,” describes the audit management facility
including the audit server, the audit management utility, and where audit-data is
stored.
Chapter 15, “OLE Automation,” describes how BaanERP works with OLE
Automation, an industry standard that applications use to expose their OLE
objects to development tools, macro languages, and other applications that
support OLE Automation.
Technical Manual
viii
1 To install BaanERP Windows (BW)
This chapter describes how to install BaanERP Windows (BW). It assumes that
BaanERP is already installed on the server. If this is not the case, refer to the
database-specific installation guide.
BaanERP Windows (BW) is a graphical user interface (GUI) program in
BaanERP. BW runs on an Intel compatible PC in a Windows 95 or Windows NT
environment. BW displays BaanERP as an application with the same look and
feel as a native Windows application.
This chapter describes:
The hardware and software requirements
How to install the BaanERP Windows (BW) software
The installation directory of BaanERP Windows (BW)
The BaanERP Windows (BW) environment variables
Technical Manual
1-1
To install BaanERP Windows (BW)
Technical Manual
1-2
To install BaanERP Windows (BW)
Click Install New Environment if you perform a fresh installation, and enter
a name for the new installation. If you want to upgrade an existing BW
installation, you must click Select Existing Environment to choose the
existing environment to be upgraded. Click Next to continue.
5 The Choose Destination Location dialog box is displayed. The layout of the
dialog box depends on whether you are installing BW on a PC client or a
Windows NT server.
If you are installing on a PC client, the following dialog box is displayed:
Technical Manual
1-3
To install BaanERP Windows (BW)
Accept the default path or click Browse to enter another path. Click Next to
continue.
6 The Setup Type dialog box is displayed:
Technical Manual
1-4
To install BaanERP Windows (BW)
Technical Manual
1-5
To install BaanERP Windows (BW)
On the NLS tab, you must fill in the following check box:
− Locale
Select the character set to be used (the default character set is
International [ISO]).
Technical Manual
1-6
To install BaanERP Windows (BW)
Technical Manual
1-7
To install BaanERP Windows (BW)
Technical Manual
1-8
To install BaanERP Windows (BW)
Technical Manual
1-9
To install BaanERP Windows (BW)
Functionality of BECS
The BECS utility offers the following functionality:
It takes the ownership of files with the .bwc extension. By doing this, it
resolves the potential conflict described above. After BECS is correctly
installed, you will start BECS by double-clicking on a .bwc file. Based on the
location of your .bwc file, BECS will locate the associated BW version, and
start this BW version accordingly. For this, your .bwc file must be stored in
the lib\user subdirectory of the directory where you installed the BW version.
BECS will start bin\BW.exe in this same directory.
It can show you the different BW versions installed on your system. Once the
BW versions have been registered, you will get an overview of all the .bwc
files for the BW versions if you start BECS. This enables you to go to the
configuration screen for each of the .bwc files, and to launch BW using the
selected configuration screen.
Technical Manual
1-10
To install BaanERP Windows (BW)
3 Edit this file, and replace the portion $(BSE)\bin\BECS.exe with the path of
your choice, for example, C:\Program Files\Baan\BECS.exe.
4 Execute the BECS.reg file by double-clicking it. This will make BECS.exe
the owner of all .bwc files.
To register BW environments
To let BECS.exe show all available .bwc files, you must create registry keys for
all BW environments. You can do so by following the steps below:
1 Start regedit
2 Go to HKEY_LOCAL_MACHINE\SOFTWARE\Baan
3 Create a new key for each BW environment that you want to register, for
example, both Baan4 and Baan5. In each key you must add a new string
value named BSE, containing the path name to the directory where you
installed the BW version. For example, the settings could look like the ones
below:
[HKEY_LOCAL_MACHINE\SOFTWARE\Baan\Baan4]
"BSE"="C:\\Program Files\\Baan\\Bw4"
[HKEY_LOCAL_MACHINE\SOFTWARE\Baan\Baan5]
"BSE"="C:\\Program Files\\Baan\\Bw5"
Technical Manual
1-11
To install BaanERP Windows (BW)
Technical Manual
1-12
2 BI server
Introduction
The BaanERP Internet Server application (BI server) is used as a gateway
between the BaanERP Internet client (BI) and the BaanERP application server
(bshell), to expose the BaanERP functionality to the Internet domain.
Architecture
The architecture of the BI server is shown in the following figure:
Technical Manual
2-1
BI server
One of the HTML pages, which is managed by the HTTP server, contains a
reference to the BI applet. When a browser performs a GET for this page, the
BI applet is downloaded to the requesting browser. The HTTP-server system
and the application-server system can be one system or they can be two
distinct systems.
A client system running a Java-enabled HTML browser. The BI applet runs
within this browser. The BI applet establishes a direct TCP/IP connection
with the BI server running on the HTTP-server system or on another system.
The following figure shows a timing diagram for setting up the connection
between a BI applet and a bshell using the BI server.
Technical Manual
2-2
BI server
Security is important when you offer application functionality over the Internet.
Security provision is available at three levels:
The HTTP server security mechanisms can be used to offer secure access to
the HTML page containing the BI applet.
Secure communication between the BI server and the BI applet is supported
by using the Secure Sockets Layer (SSL) v3.0 protocol.
Application-server system authentication.
The first level can be used to restrict access to the BI applet to a set of registered
users. This feature is completely dependent on the HTTP server and is not
described here.
The second level offers secure communication between the BI server and the BI
applet. At this level the SSL protocol is supported. The SSL protocol provides
connection security that has these basic properties:
The connection is private. Encryption is used after an initial handshake to
define a secret key. Symmetric cryptography is used for data encryption.
The peer’s identity can be authenticated by using asymmetric or public key
cryptography.
The connection is reliable. Message transport includes a message integrity
check using a message authentication code (MAC).
The BI server uses a CipherSuite that does not offer server-side certification or
client-side authentication. Furthermore, the CipherSuite uses exportable versions
of the cryptographic algorithms so that the software can be delivered to all
countries.
Note that Secure Sockets Layer (SSL) client-side certification is not used,
because this would require that each client get and store a certificate from a
certification authority. Instead, client authentication relies on the user name and
password validation used to connect to the application-server system. When you
use a Secure Sockets Layer (SSL) connection, this user name and password are
encrypted when they are transmitted from the BI applet to the BI server. In
addition, you can restrict access to the HTML page containing the BI applet by
using the HTTP server security mechanisms, which can also require client
authentication.
The BI server can be configured to use:
No Secure Sockets Layer (SSL) security.
Secure Sockets Layer (SSL) security.
Technical Manual
2-3
BI server
Configuration
The BI server allows for configuration of important communication parameters
by a system administrator. These configuration parameters include:
Listener port.
Enable/disable Secure Sockets Layer (SSL) security.
Application-server system name or IP address.
Enable/disable logging of access history and errors.
When logging is enabled, the log file name.
Performance requirements
The number of clients that can be supported by a single BI server application is
not restricted by the BI server. However, the Java virtual machine or the
underlying operating system can limit the number of simultaneous clients
supported by one instantiation of the BI server.
Technical Manual
2-4
BI server
Installation requirements
These are the requirements for installing the BI server and BI client components
on the HTTP-server system.
Before installing the BI components on the HTTP-server system, you must
install and configure the following third-party products:
An HTTP server. The operating system of the HTTP-server system
determines which HTTP server must be installed. To run the HTTP server on
a Windows NT server, you must install Microsoft Internet Information Server
(IIS). If your server is running on a UNIX system you can, for example,
install Netscape Enterprise servers or Apache.
A Java virtual machine compatible with Java 1.1. The operating system of the
HTTP-server system determines which Java virtual machine must be
installed. Contact your operating system supplier for an implementation of a
Java virtual machine.
The java string is the name of the Java interpreter. This name is supplier-
dependent (for example, jview for the Microsoft Java virtual machine).
Technical Manual
2-5
BI server
Technical Manual
2-6
BI server
BaanERP Tools
This section describes the additional steps to configure the BI server after the
installation, and contains the following sections:
Starting the BI server
Adjusting the BI HTML page
Technical Manual
2-7
BI server
Options
–s
When this option is specified, the Secure Sockets Layer (SSL) is enabled. When
this option is not specified, SSL is disabled. When security is enabled, the BI
applet must also use SSL for communication with the BI server. The BI applet
gets this information through the applet parameters in the HTML page. See the
parameter SECURITY in the section “To adjust the BI HTML page.”
–l logfile
When this command is specified, logging of access history and errors is
redirected to the file defined by the logfile placeholder. When this command is
omitted, logging information is sent to the standard output, the Java console. The
level of logging detail is set with the –t command.
–c
When this option is specified, the logging file indicated with the option –l is first
cleared, that is, truncated. If this option is not specified and the logging file
specified with the –l option already existed, all logging information is appended
to this file.
–t level
When this option is specified the level of detail for logging can be specified. A
higher level gives more detail. Level 0 disables logging. The default for this
option is level 1. The maximum level is 3.
–p port
This mandatory option is used to specify the port number on which this BI server
listens for incoming BI applet connections. Usually a port number higher than
1024 must be chosen, because lower numbers are reserved for system services.
The BI applet must also use this port number when connecting to the BI server.
The BI applets gets this port number via the applet parameters in the HTML
page. See the PORT parameter in the section “To adjust the BI HTML page.”
–a appserver
This mandatory parameter specifies the application-server system. The appserver
can be the host name of the application-server system or its IP address.
Technical Manual
2-8
BI server
Technical Manual
2-9
BI server
Technical Manual
2-10
BI server
Client issues
At the time of writing this document, no detailed information about the supported
browsers at the client side could be given. For the most up-to-date information
about the supported browsers refer to the
$PUBLIC_HTML/$TARGET_DIR/client/readme.txt file, installed on the
HTTP-server system.
Technical Manual
2-11
BI server
Technical Manual
2-12
3 Database tools
General
The database tools are designed for database management, and are independent
of how the database is organized. At run time the system selects a database driver
depending on the contents of the tabledef file. You can then use these database
tools to:
Convert a database table to a sequential (bdbpre) file.
Create a database table from a sequential dump or append data to an existing
database table (bdbpost).
Reconfigure a database table according to a new data dictionary
(bdbreconfig).
Check or repair the referential integrity in the database (refint).
If there are changes in the data dictionary, for example, if fields are added or
field lengths are changed, you can reconfigure the old table to a new one. The
data dictionary changes are incorporated in the new table, which also contains
the data dictionary table data.
The system you use determines the extension for the database tool name. For
example, bdbpre used on Windows NT is called bdbpre.exe, and on UNIX it is
called bdbpre6.2.
The following is a description of each of the database tools.
bdbpre
NAME
bdbpre
Convert database tables to a sequential file.
SYNOPSIS
bdbpre [–q output file] [–uUvVsrxyzkK][–p pack_comb][–t sep][–o dir]
[–d driver type][–N table [table ..]][–I file][–E file][–O file]
[–C company number list/range]
Technical Manual
3-1
Database tools
DESCRIPTION
The bdbpre tool reads tables for given company numbers, converts them into
sequential data, and writes them to standard output. This output can be redirected
to a file that can be used as input for bdbpost.
The bdbpre tool prints information such as names, the number of records, and
any errors. You can use the –s option to suppress the messages produced by
bdbpre at run time. This option is useful when you use the output of bdbpre as
the direct input to bdbpost.
The fd6.2.package file combination is always used to search dictionary
information. The following examples use $BSE/lib/tabledef6.2 to retrieve
information about the database type and driver. If you want to use a specific
database driver for a particular conversion, you can use the –d option. If you use
this option, tabledef6.2 is not read.
You can use bdbpre in the following ways:
You can convert a database table for more than one company number by
specifying a range of company numbers. For example:
bdbpre –Ntimcs099 –C000-005 > timcs099_dump
You can convert a database table for given company numbers. For example:
bdbpre –Ntimcs088 –C000 004 005 > timcs088_dump
You can specify all the tables for which you want to create a sequential dump
in some file in package module format. The –I option reads this file and
creates a sequential dump for each table and the specified company numbers.
For example:
bdbpre –Iseqfile –C000-009 > BIGdump
Type cat seqfile to view the contents of seqfile:
timcs001
timcs002
timcs003
........
timcs099
Technical Manual
3-2
Database tools
Technical Manual
3-3
Database tools
–N
Database table name. Specify specific table names, for example, –N timcs000
timcs016. The –I and –N options are mutually exclusive.
–I
Input file with table names. The –I and –N options are mutually exclusive.
–E file
Redirects errors to file.
–O file
Redirects output to file.
–q output file
Redirect terminal output to file output file.
–k
Drop table after dump is created.
–K
Drop table. Create a backup before dropping. This is only possible if the DBMS
supports this.
–t
Used to insert a separator (Default \0). Useful for separating the fields when
downloading records from the bshell.
EXAMPLE You want to download your database to UNIFY which uses | as a separator.
Whenever you specify the –t parameter, a sequential file (.S) is created for each
table in the current directory unless the –o option is specified.
EXAMPLE bdbpre –t"|" –Ntimcs016 –C000 creates timcs016000.S in the current
directory. This sequential file is an ASCII dump of the timcs016000 table, in
which case the fields are separated by |. You can load this file directly into
Oracle, UNIFY, and so on, using SQL.
The options –x and –t are mutually exclusive.
–x
Creates an ASCII dump with a fixed-length record and without any separators.
This option is useful to download to databases such as dBASEIII, which require
fixed-length records without any separators.
Technical Manual
3-4
Database tools
In some cases a value is printed in the dump file that does not match the number
of digits before decimal points (DIGV). For example, suppose DIGV=3 and the
printed value=1234. The whole value, more than 3 digits, is written in the dump
file, and an error message appears. To prevent this, you can use the following
options in combination with the –x option:
–y
Skip out-of-domain records for fixed-length dumps. See –x.
–z
Set value to 0 (zero) if value and DIGV do not match, that is, nullifies out-of-
domain records. Creates individual, fixed-length ASCII file with the.F extension.
See –x.
EXAMPLE bdbpre –x –Ntimcs016 –C000 creates timcs016000.F, which is an ASCII dump
with fixed-length records. This file can be loaded directly into dBaseIII.
–o
Can be specified with the options –x and –t to specify the directory name in
which the sequential file is created (.S or .F).
–M <size>
Can be specified with the options –o, –x and –t to specify the maximum size of
the output file. If the maximum file size is reached a new file (with an
extenuation number) is opened and filled. Size can be specified as any number or
a number followed by ‘K’, ‘M’ or ‘G’, for Kilo, Mega or Giga bytes. The
maximum size is 2 Gbyte.
EXAMPLES Convert Informix database to a sequential dump. The database driver is explicitly
Informix.
bdbpre –dinformix –Ntimcs000 –C000-004 > timcs000_dump
The database driver is retrieved from $BSE/lib/tabledef6.2
bdbpre –Ntimcs000 –C000-005 > timcs000_dump
Convert Oracle to Informix.
bdbpre –s –doracle –Nttadv099 –C000 001 | bdbpost –dinformix
Transport the file to another database:
bdbpre –t"|" –d"oracle(ORACLE_SID=D1)" –Ntimcs016 –C000 –oor_dump_016
bdbpre –x –dinformix –Ntimcs016 –C000 –oci_dump_016
SEE ALSO
bdbpost
NOTES If you are piping your bdbpre output directly to bdbpost without giving the –s
option, messages on the screen are jumbled.
Technical Manual
3-5
Database tools
bdbpost
NAME
bdbpost
Create a database table from a sequential dump or append data to an existing
database table.
SYNOPSIS
bdbpost [–I input file][–O output file][–{qE} output file]
[–uUvVARfilxnmkKM][–p pack_comb][–e file][–d driver type][–D seq_dir]
[–t sep][-r row/trans][–c compnr][–C compnr range][pattern]
DESCRIPTION
The bdbpost tool reads from either the argument you supply or from the
standard input and creates a new database table if that table does not exist. If the
Append option is turned on, it appends data to an existing table. The bdbpost
tool also compares current data dictionary information with the information in
the dump. If they do not match, the bdbpost tool gives an error. If the current
data dictionary is not present, it creates a data dictionary based on the dump. For
each table, bdbpost prints information such as the table name, indexes, the
number of records, and any errors.
The bdbpost tool can be run using a sequential dump created by bdbpre or by
using sequential dumps from other databases. The different methods are shown
in the following examples:
This example shows how to use a sequential dump created by bdbpre.
On system 1:
bdbpre –doracle –Ntimcs016 –C000-003 > timcs_dump
On system 2:
bdbpost < timcs_dump
This example shows the use of sequential dumps (–x or –t option of bdbpre)
from other databases. In this case the –D option is mandatory to retrieve the
directory name in which .S files are stored.
bdbpost –dinformix –t"|" –D./seqdir
Technical Manual
3-6
Database tools
Technical Manual
3-7
Database tools
–v/V
Print information about the version of bdbpost.
–p
Define package combination
<pattern>
Pattern to specify tables that are filtered out of the dump. Wildcards such as *
and ? are allowed.
–c
Company number for the tables to be created.
–C
Range of customer numbers on which to perform the bdbpost operation. This
must be the last option specified in the command, other than the <pattern>
option.
–d
Database driver type, as follows:
O (Oracle) I (Informix) S (Sybase) D (DB2) M (Microsoft SQL-Server)
You can use the -d option to copy data from one instance of a database to
another, for example:
-d “oracle(ORACLE_HOME=/usr/oracle, ORACLE_SID=D1)”
–x
Load ASCII file (.F) with fixed-length records.
–D
The directory name for ASCII files to be loaded.
–e
File to store the names of unsuccessfully created tables.
–k
The existing tables are deleted.
–K
The existing tables are deleted after a backup is made (if DBMS supports this).
–l
Display contents of input.
–I <file>
Redirects input from input file <file>.
–O <file>
Redirects output to output file <file>.
Technical Manual
3-8
Database tools
–E <file>
Redirects errors to error file <file>.
–q <output file>
Redirect terminal output to output file.
–m
Disable domain constraints.
–i
Ignore domain range error and skip record.
–n
Ignore referential integrity constraints.
–A
Append to an existing table. If duplicate records exist, do not overwrite them
from the dump. Print duplicate record summary at the end. Create table if it does
not exist.
–R
Append to an existing table or create a new one. If a record already exists, the
record in the dump replaces it. A summary is given at the end. Note that only the
existence of the primary key is checked. If a primary key exists, the record is
replaced. If the primary key does not exists but a secondary key exists, error 100
(duplicate record) occurs.
–t
Specify the used separator. The –t option is used when loading an ASCII file
from another database.
–f
Fast mode. Tables are created by first inserting all rows and then creating the
indexes (if DBMS supports this). When using the –f option be aware of the
following:
Interrupting bdbpost results in table inconsistency.
An index cannot be created in case of a duplicate conflict.
For large tables, the adding of indexes can take a long time (> 15 minutes).
–M
Can be specified with the options –x, -t or –I to specify that the input file consists
of multiple files. See also the –M option of bdbpre.
–r <row/trans>
Defines after which number of insert a commit is performed. A number below
100 is changed to 100.
Technical Manual
3-9
Database tools
Technical Manual
3-10
Database tools
bdbreconfig
NAME
bdbreconfig
Reconfigure database table according to new data dictionary.
SYNOPSIS
bdbreconfig [–uUvVpscinmfTZ][-r rows/trans][–t dir][–o file][–e file][–d
driver type][–N table [table [..]] [–I file][–O file][–E file][-M size]
[–C company numbers]
DESCRIPTION
The bdbreconfig tool reads a table name and company numbers as arguments
and converts them into a new table definition that matches a new data dictionary
definition. The bdbreconfig tool requires the following:
A new data dictionary with a new extension.
The current data dictionary (for example dtimcs016).
Tables matching those in the current data dictionary.
After successful completion, old tables are deleted and new tables are generated.
The bdbreconfig tool finds the optimum way to reconfigure. If there is no real
change in the old and new data dictionaries, it prints the message “No conversion
required.” It also sees to it that a database remains consistent.
You can perform some reconfigurations by modifying the old data dictionary.
Otherwise the reconfiguration steps are:
1 Compare the current and the new data dictionaries.
2 If reconfiguration is required, create a sequential dump
(R.<table name>, for example, R.timcs016244) for the specified tables.
3 Delete old tables.
4 From the sequential dump, build new tables that match the new data
dictionary definition.
The following options are available with bdbreconfig:
–U/u
Usage information.
–V/v
Version information.
Technical Manual
3-11
Database tools
–p
The name of the used package combination.
–p <pack. comb.>
Define the package combination.
–s
This suppresses error messages and other information.
–C
Company numbers for a given table in these formats:
Specific company numbers (for example 001 002).
Range of company numbers (for example 001-010).
–d
Database driver type, as follows:
O (Oracle) I (Informix) S (Sybase) D (DB2) M (Microsoft SQL-Server)
You can use the -d option to copy data from one instance of a database to
another, for example:
-d “oracle(ORACLE_HOME=/usr/oracle, ORACLE_SID=D1)”
–T
If the domain changes, the table is not reconfigured.
–B
Backup table instead of dropping.
–Z
Reorganize, that is, clean up, the table.
–I
The file with table names.
–i
Ignore errors during reconfiguration, for example, duplicates.
–n
Ignore referential integrity constraints.
–m
Disable domain constraints.
–f
Fast rebuild of table (first rows, then indexes).
–N
List of tables to be reconfigured.
Technical Manual
3-12
Database tools
–c
This compares two data dictionaries and checks whether reconfiguration is
required.
–t
The directory name for temporary dump files.
–I
File with table names to reconfigure.
–o
File with successfully reconfigured tables.
–e
File with unsuccessfully reconfigured tables.
–O file
Redirects output to output file file.
–E file
Redirects errors to error file file.
–M <size>
Can be specified with the options –o, –x and –t to specify the maximum size of
the output file. If the maximum file size is reached a new file (with an
extenuation number) is opened and filled. Size can be specified as any number or
a number followed by ‘K’, ‘M’ or ‘G’, for Kilo, Mega or Giga bytes. The
maximum size is 2Gbyte.
–r <row/trans>
Defines after which number of insert a commit is performed. A number below
100 is changed to 100.
The bdbreconfig tool reconfigures only one table of given company numbers at
a time.
EXAMPLE bdbreconfig –Ntimcs016 –C001
Reconfigures timcs016 for company no. 001.
bdbreconfig –Ntimcs016 –C000-010
Reconfigures timcs016 for a range of company numbers.
If bdbreconfig is used without the –c option, the exit status is either 0 or 1,
depending on successful or unsuccessful completion. If the exit status is 1
(unsuccessful) the file specified at the –o option contains tables that can be
reconfigured, and the file at the –e option contains the tables that cannot be
reconfigured.
Technical Manual
3-13
Database tools
If bdbreconfig is used with the –c option, the file specified at the -o option
contains the table names which are found correct, and the file specified at the
-e option contains the table names that must be reconfigured.
CAUTION Make a copy of the dump before executing the following.
In case of interrupted reconfiguration while the R.table file still exists, the
following command uses the R.ttadv100222 dump to rebuild the table.
bdbreconfig –N ttadv100222+
EXAMPLE bdbreconfig –Ntimcs016 –C000-003
Reconfigures timcs016 for some company numbers according to the new data
dictionary, provided that dtimcs/dtimcs016 and dtimcs/dtimcs016.new are
present.
bdbreconfig –dsybase –Ntimcs016 –C000
Reconfigures the Sybase timcs016000 table.
When the –m or –n option is used, the data in the database can violate the Baan
integrity constraints. Data can violate the Baan domains or it can violate Baan
referential integrity.
refint
NAME
refint
Check or repair the referential integrity in the database.
SYNOPSIS
refint [–uU][-vV][-b|-B file][-a |-A file][-l |-L file][-c][-n][-r][-s]
[-p package][-I infile][-O outfile][-E errfile][-N table [table [..]]]
[-C compnr [compnr [..]]]
DESCRIPTION
The refint tool checks the integrity of references in the database. You can also
use it to repair the integrity of a corrupted database. Integrity refers to the
accuracy or validity of data.
The KEY_BUFFER environment variable specifies the number of keys stored in
a buffer before updating the database. Default KEY_BUFFER=10000.
Technical Manual
3-14
Database tools
Technical Manual
3-15
Database tools
Technical Manual
3-16
4 Database management
General
Database servers and user interface servers perform processes different from
those performed by the client, the bshell. They communicate with the bshell by
using a communication protocol. This section discusses the working and usage of
several protocols that can be used for local and remote communication.
Local communication means that server and client are started on the same host
machine. Remote communication means that server and client are on different
machines.
To access tables
Tables can be distributed as follows:
Local: the tables and the bshell are on one system.
Remote: the bshell is on one system; all the tables are on another system.
Combination: some tables and the bshell are on one system; some tables are
on another system.
To access a table, the bshell and database drivers must know the database type
and the location of the table. This information has been stored in the following
files:
tabledef6.2
fd6.2.package combination
tabledef6.2
Table references that refer to a database type are stored in the tabledef6.2 file.
This file is located in the $BSE/lib directory. To fill this file, use the Tables by
Database (ttaad4111m000) and the Database Definitions (ttaad4510m000)
sessions. If the tables are on a different system, you specify the host name of the
remote system instead of entering the database type. The bshell knows which
database server must be started and in which database the required tables can be
found.
Technical Manual
4-1
Database management
fd6.2.package combination
The fd6.2.package combination file is used to refer the following dictionary
types to a specific directory (path) for a specific package combination:
Forms.
Menus.
Objects.
Program scripts.
Functions.
Report scripts.
The fd6.2.package combination file is located in the $BSE/lib directory. To fill
this file, use the Directories of Software Components (ttadv1115m000) session.
The specific directory path of the table definitions must be entered in the
Package Combinations (ttaad1520m000) session and is also placed in the
fd6.2.package combination file.
Database drivers
When an action is carried out on a table, a database driver (server) is started in
the background for the database type in question.
Technical Manual
4-2
Database management
Audit trail
Audit trail is a method by which actions on a record are logged in several audit
files using an audit server. To work with audit trails, you must place the server
name in the $BSE/lib/ipc_info file. In addition, you must specify in tabledef6.2
that you are using audit trail. To do this, set the Audit Trail field to Y or make
the audit server the mirror server. See the section, “Database mirroring.” When
the client performs an action on a table, the action is logged in an audit file
through the audit server. See also the chapter “Audit management.”
Database mirroring
Tables can be stored in one or more database systems. The tabledef6.2 file
contains references to the database where the tables are saved and/or read. For
each reference you can specify one or more database systems where the tables
are positioned. An example is:
tccom:*:oracle&host2.
This reference indicates that all tables of the tccom are in the Oracle database and
on the host2 system.
Technical Manual
4-3
Database management
The tables from the previous example are copies. A change applied to a table
from tccom is carried through in the Oracle database on the local system and on
the host2 remote system. Also, a change to the tccom tables on the remote system
must be carried through in the database on the local system. This means that
tabledef6.2 on the remote system must contain a reference to the local system.
If the system refers to a remote system, tabledef6.2 on that system is read. This
file contains a reference to both the tables from tccom and to the systems where
copies of the tccom tables are stored.
In case of a read action, if there is a local database for the tables, it is used
without a lock to enhance performance. If no local database has been defined, a
remote database is used.
The principle of database mirroring is outlined in the following figure.
Technical Manual
4-4
Database management
Alternative databases
The tabledef6.2 file contains references to the database where the tables are
saved or read. For each reference you can specify an alternative database driver
or host where the table is located.
Assume tabledef6.2 contains the following line:
*:*:host1|oracle
The previous example indicates that a table is searched or stored on host1. If that
operation fails, the table is searched or stored in a local Oracle database. If this
also fails, the table cannot be accessed.
If you are using mirroring databases, you can specify an alternative database
driver or host for each database system.
*:*:oracle&host1|host2
The previous example means that a table must be accessible in a local Oracle
database. Besides that, it is searched or stored on host1. If host1 is not available,
the table is searched or stored on host2.
Communication protocols
Communication between the client and the server includes both local and remote
communication. Local communication means that both the client and the server
are on the same system, which does not apply to remote communication.
Depending on the hardware configuration, you can choose the following
protocols for the communication between the client and the server:
Sockets (local or remote).
Pipes.
Message queues.
Only the remote socket protocol can be used for remote communication.
For the communication between client and servers, the following files or
directories are needed:
ipc_info (in the $BSE/lib directory).
A remote user file (ruser name). This file is located in the $BSE/lib/user
directory, and is described in detail in the chapter “Remote databases.”
Technical Manual
4-5
Database management
The semaphore key and message key have not been implemented either.
You can choose from the following protocols:
Socket (s).
Message queue (m).
Pipes (p).
These protocols are described in more detail in the following sections.
The server's path can include environment variables, for example $BSE, which
must be used as ${BSE}. An example of the ipc_info file is shown in Example
ipc_info File.
Technical Manual
4-6
Database management
Socket protocol
A socket is a UNIX function that enables processes to communicate in both
directions. The socket protocol is subdivided into local and remote sockets. Local
sockets are used for local communication; remote sockets for remote
communication. The client uses a local socket address if it is free at that moment.
Both sockets are described in the following paragraphs.
Local sockets
When a client (bshell) opens a table, the client reads tabledef6.2. If this file refers
to a certain server, the client reads data about that server from the file ipc_info.
The file ipc_info contains data such as the protocol to be used and the position of
the executable server. Next, the client uses a socket to start the server and
establish communication with the server.
This is done through sockets. The client reads tabledef6.2 on host A, which
indicates that the table is on host B. The client logs on to host B using the
password found in the file r<user's name> in the $BSE/lib/user directory.
The client uses a remote execute call (rexec()) to start ipc_boot6.2 on host B,
which starts fs6.2. fs6.2 is used to open, read, and write data from a remote $BSE
directory.
Technical Manual
4-7
Database management
The ipc_boot process reads ipc_info to find the directory in which fs6.2 is
located. Then an exec() call is done, so that the ipc_boot6.2 process changes to
fs6.2.
The client searches tabledef6.2 on host B, to determine which driver must be
used to open the desired table, for example, Oracle.
Another remote execute call is done; this time to start the Oracle driver on host
B. Again ipc_boot6.2 is started and reads ipc_info for the path of the Oracle
driver. Now icp_boot6.2 does an exec() call to the Oracle driver.
Communication then proceeds normally between client and Oracle driver.
Pipes protocol
The pipes protocol is analogous to the local socket protocol. In pipes protocol,
the client and server communicate through unnamed pipe streams. A pipe is a
UNIX function that enables processes to communicate in one direction. The
communication between the client and the server takes place through two pipes.
Technical Manual
4-8
Database management
For example, suppose the client wants to send information to the server. This
information or message is put in a message queue, and the semaphore key is
given the value of 1. The semaphore key shows the server that information has
been sent, so that the server can read it. After the server reads it, the semaphore
flag is reset and released, so that the client knows its information has been read.
If the client process is canceled, the client will not put data in the message queue.
However, the semaphore key is decremented using an undo value. The server
reads the message queue and finds no message. Thus, the server knows that the
client process has been terminated and stops its own process.
Technical Manual
4-9
Database management
Technical Manual
4-10
5 Native language support
General
Native Language Support controls the communication between the character set
of a terminal and that of bshell6.2.
Bshell6.2 has the 8-bit character set of ISO 8859-1. Most terminals and printers
do not support this character set, so Native Language Support techniques are
implemented.
The character set of the terminal is uniform. However, various country-
dependent keyboards can be used with the same terminal. Not all the characters
of the terminal character set can be found on the keyboard. The remaining
characters must be composed. How to compose characters is described in the
section “Composed characters.”
An input conversion table is used to convert the character set of a terminal to that
of the bshell. In this table a character from the terminal character set is converted
to the corresponding value from the ISO 8859-1. This means that characters from
the bshell must be converted again to correctly control the terminal or printer.
Both the printer and the terminal need an output conversion table. For a
description of the conversion tables, see the section “Conversion tables.”
To maintain the conversion tables you can use the NLS editor. This editor is
described in the section “NLS editor.”
Composed characters
Characters that are not found on a keyboard must be composed by a unique
combination of two or more existing characters. An example of a list of
composed characters is contained in the section “List of compose sequences.”
Prior to entering the combination, you must press a compose key. The compose
key is defined in the terminal information file of the terminal. For more
information see the section “NLS-related files.”
Technical Manual
5-1
Native language support
The compose key can be linked to a special key on the keyboard, for example, a
function key. You can also compose characters by using the Compose character
key, if it is present on the keyboard. This key has the same function as the
compose key.
The manufacturer of the terminal has defined the composed characters. The user
documentation of the terminal contains a list of these composed characters.
Conversion tables
You need two kinds of conversions to make the character sets of bshell and the
terminal or printer compatible: input conversion and output conversion.
Technical Manual
5-2
Native language support
Technical Manual
5-3
Native language support
NLS editor
Use the NLS editor to maintain input and output conversion tables. To start the
editor, type nlsedit6.2. To maintain printer output tables, use the –p option
followed by the printer name. To maintain a terminal conversion table, the shell
variable TERM must have the value corresponding to your terminal type.
For an X-terminal to display the characters of ISO 8859-1, you must have the
right font. The section “NLS-related files” contains an example of suitable fonts.
After you have started the editor, the upper part of the ISO character set (160-
255) is displayed. If a character cannot be displayed on your screen, it might be
because it is not found in the character set of the terminal.
You can display feasible options by typing ?. Exit the editor by typing Q.
Technical Manual
5-4
Native language support
The left column, input, contains the compose sequence of the input characters.
This column also contains single input characters not transparent with the ISO
character set.
The second column, int, displays the values of the characters in the ISO character
set.
The third column, s, shows the characters as they are represented after output
conversion.
Technical Manual
5-5
Native language support
The fourth column, #, contains the character set number. Character sets are
defined at the terminal or printer. The possible values are 0-9, and the default
is 0.
The last column, output, contains the output sequence of the characters. You can
type the output sequence in decimal, hexadecimal, or octal code.
The bottom of the screen shows the display mode in which the values of the
characters are displayed. The last line indicates the marked character. The
numeric representations and description are also included.
Feasible options to maintain conversion tables are:
–D/H/O set decimal/hexadecimal/octal display mode
-N toggle numeric/alpha mode compose sequence
–ARROW DOWN next line
–ARROW UP previous line
–CTRL+N next page
–CTRL+P previous page
–K single key
–C enter compose sequence
–S enter output sequence
–W write nls_in and nls_out file
–+/- increment/decrement character set number
With the options -D, -H, and -O you can change the display mode of the
character values into decimal, hexadecimal, or octal.
The -N option converts alphanumeric characters from the input and output table
to their numeric values, and vice versa.
To move the bar to the following or previous line, use the key ARROW DOWN or
ARROW UP.
Pressing CTRL+N or CTRL+P moves the bar 15 lines forward or backward.
To enter the input sequence of a single key, press -K. The editor asks you to
press the required key. That character is included directly in the table. You do not
need to press ENTER after you have entered the character.
After pressing -C you can enter the compose sequence. You can enter up to 35
characters.
Technical Manual
5-6
Native language support
To type the output sequence, enter -S. You can enter up to 35 characters.
After any modification, you can store the input and output tables by entering -W.
NLS-related files
To work with NLS you must have the following files in your BSE environment:
Terminal information file$BSE/lib/terminf/...
Printer information file$BSE/lib/printinf/...
Input conversion table$BSE/lib/nlsinf/...
Output conversion table$BSE/lib/nlsinf/...
You must also have the right terminal setup, shell variable TERM, and font. For
some additional features you can use sort tables and shift tables.
Technical Manual
5-7
Native language support
Technical Manual
5-8
Native language support
Terminal setup
The communication mode of the terminal must be 8-bit no parity. The shell
variable TERM must have the name of the terminal information file of the
terminal.
Sort tables
You can use a sort that differs from the default sort method. To do this you can
use a sort table to specify the weight of characters.
The file with the sort table has the default name:
$BSE/lib/nlsinf/sort.tab
You can make your own sort table by filling the SORT_TABLE environment
variable with the name of your own sorting file. A sort table has two columns.
The first one contains the character, the second contains the weight of that
character.
Technical Manual
5-9
Native language support
For example, to sort the B before the A, create a sort table with the following
contents:
\65 \66 or A B
\66 \65 B A
You can use escape and control codes, like \012, \e, ^A. See the section “Input
and output conversion table” for more information.
Shift tables
Shift tables can be used to specify lowercase and uppercase characters that
belong together.
The file with the shift table has the default name:
$BSE/lib/nlsinf/shift.tab
You can make your own shift table by filling the SH_TABLE environment
variable with the name of the file with your own shift table. A shift table has two
columns. The first one contains the uppercase character, the second contains the
lowercase character.
For example, to specify the lowercase and uppercase character c with cedilla,
create a shift table with the following contents:
\199 \231
Technical Manual
5-10
Native language support
Technical Manual
5-11
Native language support
Technical Manual
5-12
Native language support
Technical Manual
5-13
Native language support
12 28 44 60 76 92 108 124
FF FS ‘ < L \ l |
C 1C 2C 3C 4C 5C 6C 7C
13 29 45 61 77 93 109 125
CR GS – = M ] m }
D 1D 2D 3D 4D 5D 6D 7D
14 30 46 62 78 94 110 126
SO RS . > N ^ n –
E 1E 2E 3E 4E 5E 6E 7E
15 31 47 63 79 95 111 127
SI US / ? O _ o DEL
F 1F 2F 3F 4F 5F 6F 7F
Technical Manual
5-14
Native language support
Technical Manual
5-15
Native language support
Technical Manual
5-16
Native language support
Technical Manual
5-17
Native language support
Technical Manual
5-18
Native language support
Technical Manual
5-19
Native language support
Technical Manual
5-20
Native language support
\181 /u
\182 p!
\183 .\^
\184 ,,
\185 1^
\186 o_
\187 >>
\188 14
\189 12
\190 34
\191 ??
\192 A`
\193 A'
\194 A\^
\195 A~
\196 A"
\197 A*
\198 AE
\199 C,
\200 E`
\201 E'
\202 E\^
\203 E"
\204 I`
\205 I'
\206 I\^
\207 I"
Technical Manual
5-21
Native language support
\208 D-
\209 N~
\210 O`
\211 O'
\212 O\^
\213 O~
\214 O"
\215 xx
\216 O/
\217 U`
\218 U'
\219 U\^
\220 U"
\221 Y'
\222 TH
\223 ss
\224 a`
\225 a'
\226 a\^
\227 a~
\228 a"
\229 a*
\230 ae
\231 c,
\232 e`
\233 e'
\234 e\^
Technical Manual
5-22
Native language support
\235 e"
\236 i`
\237 i'
\238 i\^
\239 i"
\240 d-
\241 n~
\242 o`
\243 o'
\244 o\^
\245 o~
\246 o"
\247 :-
\248 o/
\249 u`
\250 u'
\251 u\^
\252 u"
\253 y'
\254 th
\255 y"
Technical Manual
5-23
Native language support
Output table
\160 \s
\164 \168
\166 |
\168 "
\172 \183
\173 -
\174 \183
\175 \183
\180 \183
\184 \183
\190 \183
\208 D
\215 x
\222 P
\240 \183
\247 /
\253 y
\254 p
\255 \253
Technical Manual
5-24
Native language support
Technical Manual
5-25
Native language support
\185 \s
\186 \250
\187 >>
\188 \247
\189 \248
\190 \s
\191 \185
\192 \161
\193 \224
\194 \162
\195 \225
\196 \216
\197 \208
\198 \211
\199 \180
\200 \163
\201 \220
\202 \164
\203 \165
\204 \230
\205 \229
\206 \166
\207 \167
\208 \227
\209 \182
\210 \232
\211 \231
Technical Manual
5-26
Native language support
\212 \223
\213 \233
\214 \218
\215 x
\216 \210
\217 \173
\218 \237
\219 \174
\220 \219
\221 \89
\222 \240
\223 \222
\224 \200
\225 \196
\226 \192
\227 \226
\228 \204
\229 \212
\230 \215
\231 \181
\232 \201
\233 \197
\234 \193
\235 \205
\236 \217
\237 \213
\238 \209
Technical Manual
5-27
Native language support
\239 \221
\240 \228
\241 \183
\242 \202
\243 \198
\244 \194
\245 \234
\246 \206
\247 /
\248 \214
\249 \203
\250 \199
\251 \195
\252 \207
\253 y\b\168
\254 \241
\255 \239
Technical Manual
5-28
Native language support
Technical Manual
5-29
Native language support
Technical Manual
5-30
6 Information files
Boolean entries
A Boolean entry reflects a feature of the terminal. A Boolean entry is set to true
by including it in the terminal information file. It is set to false either by not
including it or by prefixing it by an exclamation point (!), for example, !vt100.
Here are the available Booleans and what they mean when set to true:
aux_dual
Indicates that output to the aux port also appears on the terminal screen. The
terminal screen is disabled during aux printing.
color_cf
Provides color control in combination with code features.
Technical Manual
6-1
Information files
color_sep
Colors and code features are controlled separately.
mcf
You can move the cursor when the code feature (cf) is active.
mgr
You can move the cursor when the program is in graphics mode.
nclrwc
The terminal does not clear the screen when the width is switched from 80 to 132
columns or vice versa (No CLeaR on Window (width) Change).
vt100
After a character is entered on the last position (80 or 132), the cursor remains on
that position. The following character causes the cursor to jump to the next line.
xhp
Code features and graphic characters are not removed when they are overwritten
by characters in normal mode, but have to be removed explicitly (HP terminals).
Numbers
Numbers are variables that indicate the size of the terminal or particular features.
The following numbers are available:
cf_pos=
Number of positions required to switch a code feature on and off. The default
value is 0. The maximum value depends on the terminal type.
cols=
Number of available columns on the screen. The maximum is 132. If this value is
set to 80 you cannot switch the display to 132 positions.
disp_vt100=
Number of columns the cursor is to move if, in the last column (80th or 132nd),
the terminal receives a backspace (vt100 mode). The default value is 1. The
maximum value depends on the terminal type.
gr_pos=
Number of positions required to switch the graphics mode on and off. The
default value is 0. The maximum value depends on the terminal type.
lines=
Number of lines on screen (variable). The LINES environment variable can
overwrite this value.
Technical Manual
6-2
Information files
tmo=
Timeout sequence after pressing ESC. The given number divided by 10 specifies
the time (in seconds) in which a sequence can be typed in after ESC. If no
character is pressed between this time, the pressing of ESC is handled normally.
The default timeout sequence is 5 (0.5 second).
Strings
String variables are filled with a sequence of characters that can be used to
perform particular terminal operations.
You can use the following special characters to assign string variables:
Escape codes: Control codes: ASCII code
\b backspace ^A t/m ^Z (1-26)
\e or \E escape ^[ (27)
\f form feed ^\(28)
\n new line ^](29)
\r carriage return ^^ (30)
\t tab ^_ (31)
\s space
\xx decimal value xx= 1-255
\0xx octal value xx= 1-377
\xxx hexadecimal value xx= 1-FF (for example \x1F)
You can also use an octal value instead of an alphabetical representation. For
example, “escape” becomes \033. The control codes are converted to the ASCII
codes 1 to 31. For example, ^B equals the ASCII character with decimal value 2
(STX).
The following string variables are possible:
aux_off=
Closes the auxiliary port. All data is displayed on the terminal.
aux_on=
Opens the auxiliary port. All data sent to the terminal is passed to the aux port.
bell=
Audible signal (usual value: ^G).
cadr=
Absolute column positioning string. See the section “Parameterized strings”
about the use of a parameterized string.
Technical Manual
6-3
Information files
cbl=
Character used in graphics mode to display the lower left corner (+). If it is not
available, a viable alternative is +. Do not leave the variable empty, because this
can result in screen layout problems.
cbr=
Character used in graphics mode to display the lower right corner (+). If it is not
available, a viable alternative is +. Do not leave the variable empty, because this
can result in screen layout problems.
cf_b=
Code feature, blinking.
cf_br=
Code feature, blinking, and reversed.
cf_bru=
Code feature, blinking, reversed, and underlined.
cf_bu=
Code feature, blinking, and underlined.
cf_B=
Code feature, bold.
cf_Bb=
Code feature, bold, and blinking.
cf_Bbr=
Code feature, bold, blinking, and reversed,
cf_Bbru=
Code feature, bold, blinking, reversed, and underlined.
cf_Bbu=
Code feature, bold, blinking, and underlined.
cf_Br=
Code feature, bold, and reversed,
cf_Bru=
Code feature, bold, reversed, and underlined.
cf_Bu=
Code feature, bold, and underlined.
cf_n=
Code feature, normal.
cf_r=
Code feature, reversed.
Technical Manual
6-4
Information files
cf_ru=
Code feature, reversed, and underlined.
cf_u=
Code feature, underlined.
clear=
Clears the entire display and moves the cursor to the top left corner of the screen.
csr=
Character sequence for changing the scrolling region. The first parameter
indicates the start line. The second parameter indicates the end line of the
scrolling region. See also the section “Parameterized strings.”
ctl=
Character used in graphics mode to display the upper left corner (+). If it is not
available, a viable alternative is +. Do not leave the variable empty, because this
can result in screen layout problems.
ctr=
Character used in graphics mode to display the upper right corner (+). If it is not
available, a viable alternative is +. Do not leave the variable empty, because this
can result in screen layout problems.
cu_off=
Cursor off (invisible).
cu_on=
Cursor on (visible).
cub=
The cursor moves back the specified number of columns. See the section
“Parameterized strings.”
cub1=
The cursor moves back one position.
cud=
The cursor moves down the specified number of rows. See the section
“Parameterized strings.”
cud1=
The cursor moves down one row.
cuf=
Move the cursor forward by the specified number of columns. See the section
“Parameterized strings.”
cuf1=
The cursor moves forward one position.
Technical Manual
6-5
Information files
cup=
Absolute cursor positioning. See the section “Parameterized strings.”
cuu=
The cursor moves up by the specified number of rows. See the section
“Parameterized strings.”
cuu1=
The cursor moves up one row.
delch=
Deletes the character below the cursor.
delli=
Deletes one line.
dt=
Character used in graphics mode to display the lower T-bar. If it is not available,
a viable alternative is +. Do not leave the variable empty, because this can result
in screen layout problems.
el=
Deletes to the end of the row.
es=
Deletes to the end of the screen.
ewin=
Erases the current window.
flash=
Flashes the screen instead of beeping when an error occurs.
gr_off=
Turns graphics mode off.
gr_offB=
Turns bold graphics mode off.
gr_on=
Turns graphics mode on.
gr_onB=
Turns bold graphics mode on.
hb=
Character used in graphics mode to display the horizontal bar. If it is not
available, a viable alternative is –. Do not leave the variable empty, because this
can result in screen layout problems.
Technical Manual
6-6
Information files
home=
Positions the cursor in the upper left corner of the screen.
if=
Name of file containing codes to initialize the terminal. This initialization is done
after the initialization string in init and before the string in init2. In the file you
can, for example, specify a large number of codes that do not fit in a string of
soft font codes.
inch=
Insert one character, usually a space at the current cursor position.
init=
Initialization string sent to the terminal to set it up for proper use by the bshell.
This string is sent before any other output.
init2=
Initialization string sent to the terminal to set up. This string is sent during
initialization of the terminal, after the init string and the codes in the file
specified at the if entry.
inli=
Insert one line.
kr=
Character used in graphics mode to display the center crossbar (+). If it is not
available, a viable alternative is +. Do not leave the variable empty, because this
can result in screen layout problems.
ladr=
Absolute line positioning string. See the UNIX manual TERMINFO(4) and the
section “Parameterized strings” about defining such a string with one parameter.
lt=
Character used in graphics mode to display the left T-bar. If it is not available, a
viable alternative is +. Do not leave the variable empty, because this can result in
screen layout problems.
nls_in=
Name of NLS input conversion table. See the NLS4.2 user manual.
nls_out=
Name of NLS output conversion table. See the NLS4.2 user manual.
rc=
Restores cursor position and attributes saved with the character sequence
specified with the sc entry.
Technical Manual
6-7
Information files
reset=
Reset initialization string. The terminal is set up in such a way that it can be used
in UNIX or other programs. The string is sent after the bshell terminates
execution.
rt=
Character used in graphics mode to display the right T-bar. If it is not available, a
viable alternative is +. Do not leave the variable empty, because this can result in
screen layout problems.
sc=
Save cursor position and attributes.
set0=, to set9=
Set a character set of the terminal. The default set is set0.
set80=
Set the display width to 80 column.
set132=
Set the display width to 132 columns.
ut=
Character used in graphics mode to display the upper T-bar. If it is not available,
a viable alternative is +. Do not leave the variable empty, because this can result
in screen layout problems.
vb=
Character used in graphics mode to display the vertical bar. If it is not available,
a viable alternative is | (pipeline). Do not leave the variable empty, because this
can result in screen layout problems.
Technical Manual
6-8
Information files
The following dim code features are used in graphics mode if the normal code
features are defective. (Poppy and Wyse terminals):
cblB=. See cbl, but bold.
cbrB=. See cbr, but bold.
ctlB=. See ctl, but bold.
ctrB=. See ctr, but bold.
dtB=. See dt, but bold.
hbB=. See hb, but bold.
krB=. See kr, but bold.
ltB=. See lt, but bold.
rtB=. See rt, but bold.
utB=. See ut, but bold.
vbB=. See vb, but bold.
Keys
This section describes how you can access keys on the keyboard. Use the string
assigned to each entry to specify either the sequence that simulates the key or the
sequence that is generated when the user presses the key.
If you want to use a special key in the bshell, you must specify this key in the
terminal information file. If the key is present on the keyboard, you must assign
the corresponding sequence to it. If the key is not present, you can assign another
sequence.
For several key entries, a default value is given along with the ASCII code and
decimal code. For example:
CTRL+J (LF, 10d)
The following keyboard entries are possible:
k1=, to k20=
Specifies the function keys F1 to F20.
k1c=, to k20c=
Specifies the function keys when the CTRL key is held down.
k1s=, to k20s=
Specifies the function keys when the SHIFT key is held down.
Technical Manual
6-9
Information files
k1sc=, to k20sc=
Specifies the function keys when the SHIFT and CTRL keys are held down.
kbs=
Backspace; moves cursor one position back. Default: CTRL+H (BS, 8d).
kbtab=
Specifies the back tab key.
kcompose=
Key compose; used to define a code for NLS character composition.
kcs=
Key column switch. If it cannot display all 132 columns at once, switches
function between the left and right half of the display (usually \eC or \ec).
kd=
Key down; moves cursor one position down. Default: CTRL+J (LF, 10d).
kdc=
Key delete character; removes one character. Default: <Del> (127d).
kdo=
Key do.
kesc=
Key escape.
kf=
Key forward; moves cursor one position to the right. Default: CTRL+L (FF, 12d).
kfind=
Key find.
khlp=
Key help.
khome=
Key home; moves the cursor to the upper left corner of the screen. Default:
CTRL+^ (RS, 31d).
kid=
Key interrupt debugging.
kinshere=
Key insert.
kkill=
Key kill.
kl=
Key left; moves the cursor one position to the left. Default: CTRL+H (BS, 8d)
Technical Manual
6-10
Information files
knscreen=
Key page down.
kpr=
Key print.
kpscreen=
Key page up.
kre=
Key refresh; rewrites screen (usually \eR or \er).
kremove=
Key remove.
kselect=
Key select.
ktab=
Key tab.
ku=
Key up; moves the cursor up one line. Default: CTRL+K (VT, 11d).
pf1=, to pf4=
DEC vt100 “gold” keys. NOTE (only for Baan-C programmers):
When you use event functions, your program can catch the keys defined in your
terminal information file. When the program catches a key-press event, it returns
a code for that key. The codes used for the keys are shown in the
$BSE/include6.2/bic_key header file.
For example, a line in the header file is:
#define KEY_F(1) 1024
This indicates that the F1 function key (k1 in a terminal information file) is
identified by code 1024. You can use the KEY_F(1) macro in your program to
check if the defined sequence for the F1 function key is given.
See the section ”Example of terminal information files” for an extensive example
of terminal information files.
Technical Manual
6-11
Information files
Color support
Colors can be sent to the screen separately or in combination with code features,
depending on the capabilities of the terminal. This is set in the terminal
information file with the color_cf and color_sep Boolean values.
color_cf
The code feature can be sent together with the color codes in one single escape
sequence.
color_sep
The color codes cannot be combined with the code features.
Technical Manual
6-12
Information files
You can also assign escape sequences to these entries. For example:
color_sep
bg_black=\e[40m
bg_red=\e[41m
bg_green=\e[42m
bg_yellow=\e[43m
bg_blue=\e[44m
bg_magenta=\e[45m
bg_cyan=\e[46m
bg_white=\e[47m,
fg_black=\e[30m
fg_red=\e[31m
fg_green=\e[32m
fg_yellow=\e[33m
fg_blue=\e[34m
fg_magenta=\e[35m
fg_cyan=\e[36m
fg_white=\e[37m,
Technical Manual
6-13
Information files
The colors can be sent to the terminal along with code features with the
following string entries. The foreground and background color must be specified
as parameters.
cf_co_n=, # colors as specified and code feature normal
cf_co_B=, # code feature bold
cf_co_b=, # code feature blinking
cf_co_Bb=, # code feature bold and blinking
cf_co_r=, # code feature reverse
cf_co_Br=, # code feature bold and reverse
cf_co_br=, # code feature blinking and reverse
cf_co_Bbr=, # code feature bold, blinking and reverse
cf_co_u=, # code feature underlined
cf_co_Bu=, # code feature bold underlined
cf_co_bu=, # code feature blinking underlined
cf_co_Bbu=, # code feature bold, blinking underlined
cf_co_ru=, # code feature reverse underlined
cf_co_Bru=, # code feature bold, reverse underlined
cf_co_bru=, # code feature blinking, reverse underlined
cf_co_Bbru=, # code feature bold, blinking, reverse underlined
For example:
cf_co_n=\e[0;22;%p1%{30}%+%d;%p2%{40}%+%dm
cf_co_B=\e[0;1;%p1%{30}%+%d;%p2%{40}%+%dm
cf_co_b=\e[0;5;22;%p1%{30}%+%d;%p2%{40}%+%dm
cf_co_Bb=\e[0;1;5;%p1%{30}%+%d;%p2%{40}%+%dm
cf_co_Br=\e[0;1;7;%p1%{30}%+%d;%p2%{40}%+%dm,
In the previous example, %p1 is foreground color; p1=0-7 and %p2 is
background color; p2=0-7. See the section, “Colors in combination with code
features.” For use of parameters within a string entry, see the section
“Parameterized strings.”
Technical Manual
6-14
Information files
Parameterized strings
Some of the string entries described in the section “Terminal information file”
require a number of parameters. For example, to address the cursor, the cup entry
requires two parameters: the row and column to which to address to. The use of
parameters in a string entry is described in this section.
The parameter mechanism uses a stack and special codes, starting with % to
manipulate the stack.
Technical Manual
6-15
Information files
EXAMPLES %i\e[%p1%d;p2%dr
This example is used to change the scrolling region on C.Itoh terminals. The first
parameter +1 specifies the start row, the second parameter +1 specifies the end
row of the region. Both are used as numerics in the escape sequence.
Technical Manual
6-16
Information files
\e[0;22;%p1%{30}%+%d;%p2%{40}%+%dm
The sequence in this example is used to set a color and code feature. The code
feature normal is set, the foreground color is set to the first parameter +30, and
the background color is set to the second parameter +40.
Technical Manual
6-17
Information files
#*****************************
# Booleans
#*****************************
vt100
#nclrwc
mcf
mgr,
#*****************************
# Numbers
#*****************************
cols=132
lines=24
cf_pos=0
gr_pos=0
tmo=5
disp_vt100=0,
#*****************************
# Strings
#*****************************
# Setup
#
# init \e[?3l set 80 cols
# \e[0;1m reset attributes and set bold
# \e> set keypad mode to numeric
# \e[1l set cursor key mode to normal
# \e[?25l set cursor mode to visible
# init2 \e(B ASCII –> G0
# (fonts) \e-A Latin-1 –> G1
# ^O (SI) invoke G0 into GL
# gr_on \e(0 Spec.Graph –> G0
# reset \e[0m reset attributes
# \e[H cursor position 0,0
# \e[2J reset entire screen
#
init=\e[?3l\e[0;1m\e>\e[1l\e[?25l
init2=\e(B^O\e-A
reset=\e[0m\e[0;0H\e[2J\e(B^O\e-A,
set80=\e[?3l
set132=\e[?3h,
bell=^G
tmo=20,
csr=%i\e[%p1%d;%p2%dr,
# Line Draw Chars (Char.set: DEC Special Graphic)
#
gr_on=\e(0^O
gr_ond=\e(0^O\e[0m
Technical Manual
6-18
Information files
gr_off=\e(B^O
gr_offd=\e(B^O\e[0m,
cbl=m
cbld=m
cbr=j
cbrd=j
ctl=l
ctld=l
ctr=k
ctrd=k
dt=v
dtd=v
ut=w
utd=w
lt=t
ltd=t
rt=u
rtd=u
kr=n
krd=n
hb=q
hbd=q
vb=x
vbd=x,
# Code Features
#
cf_n=\e[0m
cf_d=\e[0;1m
cf_b=\e[0;5m
cf_db=\e[0;1;5m
cf_r=\e[0;7m
cf_dr=\e[0;1;7m
cf_br=\e[0;5;7m
cf_dbr=\e[0;1;5;7m
cf_u=\e[0;4m
cf_du=\e[0;1;4m
cf_bu=\e[0;4;5m
cf_dbu=\e[0;1;4;5m
cf_ru=\e[0;4;7m
cf_dru=\e[0;1;4;7m
cf_bru=\e[0;4;5;7m
cf_dbru=\e[0;1;4;5;7m,
# Cursor Control & Positioning
#
cu_on=\e[?25h
cu_off=\e[?25l
Technical Manual
6-19
Information files
cup=%i\e[%p1%d;%p2%dH,
cuu=\e[%p1%dA
cuu1=\e[1A
cud=\e[%p1%dB
cud1=\e[1B
cuf=\e[%p1%dC
cuf1=\e[1C
cub=\e[%p1%dD
cub1=\e[1D,
home=\e[0;0H
clear=\e[0;0H\e[2J\e[?25l,
# Editing
#
inch=\e[@
delch=\e[P
inli=\e[L
delli=\e[M
el=\e[0K
es=\e[0J
#ewin=,
# Printer Control
#
aux_on=\e[5i
aux_off=\e[4i,
# Nls
#
nls_in=generic.in,
#********************************************************
# @(#)
# @(#) File : vtansi.fkeys
# @(#)
# @(#) Comment : Include-file for VTxxx terminals function-keys
# @(#) (ANSI-compatible)
# @(#)
#********************************************************
# Available Keys
#*****************************
# Function Keys
#
#k6=\e[17~
#k7=\e[18~
#k8=\e[19~
#k9=\e[20~
#k10=\e[21~
k11=\e[23~
Technical Manual
6-20
Information files
k12=\e[24~
k13=\e[25~
k14=\e[26~
#k15=\e[28~
#k16=\e[29~
#k17=\e[31~
#k18=\e[32~
#k19=\e[33~
#k20=\e[34~,
# VT "Gold Keys"
#
pf1=\eOP
pf2=\eOQ
pf3=\eOR
pf4=\eOS,
# VT Cursor Pad
#
khlp=\e[28~
kdo=\e[29~
kfind=\e[1~
kinshere=\e[2~
kremove=\e[3~
kselect=\e[4~
kpscreen=\e[5~
knscreen=\e[6~
ku=\e[A
kd=\e[B
kf=\e[C
kl=\e[D,
#*****************************
#BA6.2 Special Keys
#*****************************
#Misc. Keys
#
# F6 = kmenu F17 = kprocess
# F7 = kcompose F18 = kkill
# F8 = kre F19 = knextdisp
# F9 = kcs F20 = kprevdisp
# F10 = kswitch
#
kmenu=\e[17~,
kcompose=\e[18~,
kre=\e[19~,
kcs=\e[20~,
kswitch=\e[21~,
kprocess=\e[31~,
Technical Manual
6-21
Information files
kkill=\e[32~,
knextdisp=\e[33~,
kprevdisp=\e[34~,
#*****************************
Technical Manual
6-22
Information files
The escape sequences can contain special characters. They can be divided into
escape codes and control codes.
Technical Manual
6-23
Information files
bin4=
Select fourth paper bin.
hpos=
Set horizontal cursor position of the printer.
initpage=
String sent before each page.
initpr=
Initialization string preceding the output to the printer. This variable must be
filled with the codes for large typeface.
initprog=X
The output of program X (full path name) is sent to the printer.
initpr2=
The second initialization string sent after initprog.
landscape=
Select landscape printing.
large=
Large typeface (10 cpi) control. Some printers require a code to change the
typeface size.
nls_out=
NLS output table name.
middle=
Medium typeface (12cpi) control. Some printers require a code to change the
typeface size.
You can use the following codes to set the print color:
p_black=
p_red=
p_green=
p_yellow=
p_blue=
p_magenta=
p_cyan=
p_white=,
pbold=
Print boldface characters. A boldface character can print wider than its original.
This does not imply any proportional spacing. Printing graphic characters (with
ASCII code over 127 decimal) yields additional line feeds on most Mannesmann
printers. If this variable is not used, the bshell simulates boldface printing by
reprinting each line, making use of the carriage return character.
Technical Manual
6-24
Information files
pcbl=
Print +. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
pcbr=
Print +. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
pctl=
Print +. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
pctr=
Print +. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
pdbl_wide=
Double wide mode on.
pdt=
Print –. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
pfont1=, to pfont16=
Select font 1 to font 16. These fonts are user definable.
phb=
Print –. If this variable cannot be filled because the printer cannot print it, for
example, a – is used.
pitalic=
Italic mode on.
pkr=
Print +. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
plt=
Print |. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
pnlq=
NLQ mode on.
pobold=
Switch off boldface printing without affecting character size.
podbl_wide=
Double wide mode off.
Technical Manual
6-25
Information files
pofont1=, to pofont16=
Deselect font 1 to font 16. These fonts are user definable.
poitalic=
Italic mode off.
ponlq=
NLQ mode off.
porev=
Reverse mode off.
portrait=
Select portrait printing.
posubscript=
Subscript mode off.
posuperscript=
Superscript mode off.
pounder=
Underlined printing off.
prev=
Reverse mode (white on black).
prt=
Print |. If this variable cannot be filled, for example, because the printer cannot
print it, a + is used.
psubscript=
Subscript mode on.
psuperscript=
Superscript mode on.
punder=
Print underlined characters. If this variable cannot be filled, the bshell simulates
underlining by printing underscore characters on the next line.
put=
Print –. If this variable cannot be filled because the printer cannot print it, for
example, a + is used.
pvb=
Print vertical bar. If this variable cannot be filled because the printer cannot print
it, for example, a | (pipeline) is used.
Technical Manual
6-26
Information files
q1=, to q13=
These thirteen variables can be filled with strings that specify whether a character
must be printed in double width, italicized, and so on. The variables are user-
definable. These codes have been replaced and they will be removed in a future
release.
resetpr=
Resets the printer. The string is sent to the printer after all output. Fill this
variable with a form feed (\014) followed by the large typeface codes.
resetprog=X
The output of program X (full path name) is sent after the reset string.
resetpr2=
The second reset string, sent after resetprog.
set0=, to set9=
Set a character set of the printer. The default set is set0.
small=
Small typeface (16.66-17 cpi) control. Some printers require a code to change
typeface size.
usr1=, to usr16=
Define user entry1 to user entry16.
Bar codes
The report writer interfaces with the printer driver using bar-code scripts. A bar-
code script saves the cursor position, prints a bar code with given height and
returns to the saved cursor position. These scripts must be available in the
barcode_dir directory. This directory is relative to $BSE/lib/barcode, so if
barcode_dir = hp_barcode, the bar-code directory is
$BSE/lib/barcode/hp_barcode. Bar-code scripts are prefixed by the word “type”
and suffixed by a two-digit number. For example:
type01.
Technical Manual
6-27
Information files
Technical Manual
6-28
Information files
height=`expr $height – 1`
done
# – last (empty) line of bar code
Push
echo "(- (\c"
Pop
# – select Courier 12cpi.
echo "\033(10U\033(s0p12.00h10.0v0s0b3T\c"
# – move x+25 dots
echo "\033*p+25X\c"
# – print code (text)
echo "$str1 $str2\c"
# – restore cursor position for filter
Pop
exit 0
Technical Manual
6-29
Information files
Technical Manual
6-30
7 User Interface (UI) page mode
This chapter describes the User Interface (UI) page mode in BaanERP. The UI
page mode improves the response times on networks where information
processing can be delayed, for example, in a wide area network (WAN).
In normal mode, the 4GL Engine validates the entered data per field. In the UI
page mode, the 4GL Engine validates data per page, and not per field. The
synchronous interaction between the UI driver and the bshell is therefore
significantly reduced.
The UI page mode is designed for experienced BaanERP users, because the
interaction between BaanERP and the user is not as extensive as in the normal
mode.
In the normal mode, an error message is displayed immediately when data
entered in the active field is not correct. In the UI page mode, an error-logging
window appears, which shows all errors that occurred during the validation of all
the data entered on the page.
In the UI page mode, the UI driver groups together a number of UI objects that
form a logical unit. A UI object is for example, a field, a button, or a check box.
The logical unit is known as a page. A page can be an Overview window or a tab
in a details session with more than one tab.
If the UI page mode is selected, each UI object automatically belongs to a page.
If the UI object is positioned on a tab, the object is considered part of the page
associated with the related tab. In any other case, the UI object is part of the page
associated with the Overview window.
Technical Manual
7-1
User Interface (UI) page mode
Tab processing
When the UI page mode is selected, the UI driver processes Tab key movements
in the details window. The Tab key sequence is identical to the creation order of
the UI objects on a page. Other navigation keys, such as Page Up, Page Down,
Home and End are reported to the bshell with the appropriate keystroke.
Event processing
If the UI page mode is selected, events are treated differently by the UI driver
than when normal mode is selected. There are four different event categories:
Suppressed events.
Delayed events.
Synchronization events.
Bypass events.
Technical Manual
7-2
User Interface (UI) page mode
Suppressed events
If the UI page mode is selected, a UI object does not send suppressed events to
the bshell. Instead, suppressed events are handled locally by the UI driver on the
client. An example of a suppressed event is to move from an active element to
another active element.
Delayed events
Status changes of UI objects can be delayed. As soon as a synchronization event
occurs, for example, by clicking the Validate button, the changed UI objects are
requested to synchronize their status with the 4GL engine. The delayed events
are sent in the same order as the Tab key sequence of the UI objects on the page.
This is not necessarily the order in which the user enters data. If possible, the
delayed events are sent into one network frame to reduce response times.
Synchronization events
The synchronization events make sure that the statuses of the changed UI objects
are sent to the bshell for validation.
Synchronization events are:
Selecting a menu item.
Clicking a button.
Moving to another tab.
Moving from a synchronizing field to another field.
Starting a browse session.
Pressing a key that is not handled by the UI client.
Resizing a window.
Using the scroll bar.
Bypass events
The following bypass events are sent immediately to the bshell without first
being synchronized with the delayed events:
Using the online Help.
Closing a Windows application that was started through the application Start
feature of the UI client.
Using OLE objects.
Technical Manual
7-3
User Interface (UI) page mode
Technical Manual
7-4
User Interface (UI) page mode
Technical Manual
7-5
User Interface (UI) page mode
Dynamic Forms
1 In the graphical Dynamic Form Editor, click the field to start the Field
Properties session.
2 On the Miscellaneous tab, select the Synchronized check box.
3 Click OK to return to the graphical Dynamic Form Editor.
4 On the Specific menu, choose Check In to finish the procedure.
Technical Manual
7-6
8 Customer-support tools
General
This chapter describes two aspects essential to solving errors in a bshell
environment: error logging and the bserel6.2 program. Error logging is to keep a
record of error messages in a log file. The log file contains information on when
the error occurred and which processes were then active. See the section “To log
errors.”
The bserel6.2 program provides information on the BSE environment as installed
on your system. Among other things, bserel6.2 checks permissions, the
availability of programs, and the correctness of program objects. This data can be
collected in a report and viewed on screen, printed, or sent to a file.
If you want to submit an error to the Customer Support Center of Baan Info
Systems, add both the error logging report and the bselrel6.2 report to your error
report.
To log errors
Certain actions in a bshell program can result in an error. Usually an error is
displayed and from it you can see what went wrong.
To localize bshell errors, a status report of the program is written to a log file.
Use this file to find out where and when the error occurred.
Log file
The log files to which the errors are written are stored in the $BSE/log directory.
Its name format is:
log.<program name>
This means that when an error occurs in bshell6.2, it is logged in the
log.Bshell6.2 file. If it occurs in bx6.2, it is logged in log.bx6.2, and so on.
Technical Manual
8-1
Customer-support tools
Log-file layout
The header of the log file is: START of log message, followed by:
Date, time, logon name, and TTY number.
Source program name with line number.
Keyword.
UNIX process, user, and group identifiers for program.
User type, language code, logon code and TTY number of the user.
Error number and bdb error number.
Error message as displayed on screen.
If, for instance, you end a bshell program with an Interrupt (CTRL+\), this action
is written as an error in the log file. The message keyword is “core dump.” The
log file also contains the following blocks:
Process List.
Screen Dump.
Process Information.
The Process List block is a list of the active bshell processes at the moment the
error occurred. This list contains the following information for each bshell
process:
Process identifier.
Parent.
Status.
cpu.flags.
Process name.
Line number (debug mode only).
Technical Manual
8-2
Customer-support tools
The Screen dump block contains the screen active at the moment the error
occurred. The last block, Process Information, contains the individual process
information about each process from the list. It can consist of:
The line from the process list for the process involved.
Session code, process ID, and parent number.
Object.
Main table.
Zoom field.
Return zoom field.
Default printer.
Forms.
Reports.
Tables.
Variables, including values in force when the error occurred (empty strings,
strings with value 0, and strings consisting of tabs are not logged). The
section “Example error logging” contains an example of error logging.
Technical Manual
8-3
Customer-support tools
Technical Manual
8-4
9 Executable programs
Database management
This chapter describes the executable programs used for database management
that are located in the $BSE/bin directory. Whether you have all the executable
programs described in this chapter depends on your particular installation set.
The programs are sorted by type of database server. References are included for
programs described in other documents.
General
audit_srv6.2
This is the name of the server that handles logging of actions on the database.
See the chapter “Audit management.”
bdbpre6.2
Program to convert database tables to a sequential dump. See the chapter
“Database tools.”
bdbpost6.2
Program to create database tables from a sequential dump. See the chapter
“Database tools.”
bdbreconfig6.2
Program to reconfigure database tables. See the chapter “Database tools.”
dpt6.2
Test program of database actions. Program for internal use, not for the end user.
refint6.2
Function to check the referential integrity of database tables. See the chapter
“Database tools.”
gcommand6.2
Database test program used internally to solve problems. Not intended for the
end user.
qptool6.2
Database test program used internally to solve problems. Not intended for the
end user.
Technical Manual
9-1
Executable programs
blogind6.x
A program that connects the client to the server using secure passwords.
Oracle
ora7_inst6.2
The program used to install the Oracle driver.
ora7_deinst6.2
The program used to deinstall the Oracle driver.
ora7_srv6.2
This is the driver for Oracle Version 7.
ora7_maint6.2
The Oracle version of the program used to maintain the database.
ora8_srv6.2
This is the driver for Oracle Version 8.
ora8_maint6.2
The program used to maintain Oracle version 8.
Sybase
syb_install6.2
The program used to install the Sybase driver.
syb_srv6.2
This is the Sybase driver itself.
syb_admin6.2
The shell script for doing administration.
syb_maint6.2
The Sybase version of the program used to maintain the database.
Informix
inf_install6.2
The program used to install the Informix driver.
inf_srv6.2
This is the Informix driver itself.
inf_admin6.2
The shell script for doing administration.
inf_maint6.2
The Informix version of the program used to maintain the database.
Technical Manual
9-2
Executable programs
DB2
db2_install6.2
The program used to install the DB2 driver.
db2v5_srv6.2
This is the driver executable program that functions with DB2 V5.
db2_admin6.2
The shell script for doing administration with DB2.
db2v5_maint6.2
This is the maintenance executable program, to be used with the DBA module,
which works with DB2 V5.
Technical Manual
9-3
Executable programs
SYNOPSIS
Bshell6.2 [options] [program [program arguments]]
Options for bshell6.2 are described in the following sections:
To debug the bshell during run time
− Baan CPU.
− Scheduler.
− File I/O.
− Miscellaneous.
− Message and log extract.
Memory usage.
Miscellaneous.
The parse_arguments al_1 function recognizes the following options by default:
-- : end of parameter list
-set var=val : set environment variable var to val
To pass options to the bshell, enter them in the command line of the BW
Configurator, for example:
-- –set CORE=1 –dbgcpu –dbgfun ttaad2100m000
− pass "-set CORE=1 –dbgcpu –dbgfun" options to Bshell
− and run Application Configuration (ttaad2100m000) session
Bshell logs all its output to $BSE_TMP/bshell.PID. This log file is removed
when the bshell exits normally. You can instruct the bshell to keep the log file
with the –keeplog option.
Baan CPU
Debug functions
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Debug Functions. Or, from the command line, run –dbgfun.
Use debug version of the CPU
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Debug CPU. Or, from the command line, run –dbgcpu.
Technical Manual
9-4
Executable programs
Technical Manual
9-5
Executable programs
Miscellaneous
Show object information
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Show Object Information. Or, from the command line, run –
dbgobj.
Show whether domains, data definitions and objects are loaded from disk or
shared memory
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Show SRDD Use. Or, from the command line, run –
dbgsrdduse.
Show various TSS debugging information
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Debug TSS. Or, from the command line, run –dbgtss.
Show data input options (not for fields)
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Debug data.input(). Or, from the command line, run –
dbgdata.
Stop debugger, if possible, when a message is sent to the message window
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Debug Messages. Or, from the command line, run –dbgmesg.
Show loaded resources
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Debug Resources. Or, from the command line, run –dbgres.
Do not remove the logfile after ending the Bshell
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Keep Log File. Or, from the command line, run –keeplog.
Add time stamps to Bshell log output
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Add Time Stamps. Or, from the command line, run –logtime.
Database related
Show the Baan database activities initiated from the Bshell
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Show BDB Actions. Or, from the command line, run –
dbgbdbact.
Show actions related to enums
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Print Enums. Or, from the command line, run –dbgenums.
Technical Manual
9-6
Executable programs
BDB/SQL Tracing
To trace BaanERP database and SQL actions, display the Option Dialog dialog
box and click Debug Bshell. The Run Time Debugging of Bshell dialog box
appears. You can also choose these options from the command line.
BDB Debug Flags
Show the drivers and parameters currently in use
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Driver Type. Or, from the command line, run
BDB_DEBUG=01.
Show database actions such as Insert, Update, Delete, Commit, and Abort
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Database Actions. Or, from the command line, run
BDB_DEBUG=02.
Show information on currently set locks
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Delayed Locks. Or, from the command line, run
BDB_DEBUG=04.
Show references between tables
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select References. Or, from the command line, run
BDB_DEBUG=010.
Show all tables using native storage format
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Multibyte Storage. Or, from the command line, run
BDB_DEBUG=040.
Show the permissions and roles allowed for each user
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Permissions/Roles. Or, from the command line, run
BDB_DEBUG=0100.
Technical Manual
9-7
Executable programs
BDB_DEBUG Value
Shows the current setting that can be used in a –set BDB_DEBUG=<value>
from the command line.
TT SQL TRACE Flags
Show the full text of a query with an ID number
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Show Query with ID. Or, from the command line, run
TT_SQL_TRACE=040.
Show how long a query has been running
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Query Execution Times. Or, from the command line, run
TT_SQL_TRACE=0200.
Show main SQL functions such as SQLExec, SQLParse, SQLFetch, and
SQLBind
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Internal SQL Functions. Or, from the command line, run
TT_SQL_TRACE=02000.
Show the best possible design for indexing, joins, and so on
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Query Evaluation Plan. Or, from the command line, run
TT_SQL_TRACE=04000.
Show all full table scans
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Show Full Table Scans. Or, from the command line, run
TT_SQL_TRACE=020000.
Show low-level communication between client and driver
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Show BDB Communication. Or, from the command line,
run TT_SQL_TRACE=040000.
Show current time to level of milliseconds: YYYYMMDDhhmmss.mmm
In the Option Dialog dialog box, select Debug Bshell. On the BDB/SQL
Tracing tab, select Add Time Stamps (SQL). Or, from the command line, run
TT_SQL_TRACE=0400000.
TT_SQL_TRACE value
Shows the current setting that can be used in a –set TT_SQL_TRACE=<value>
from the command line.
Technical Manual
9-8
Executable programs
Memory usage
Show currently running processes in bshell
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Dump Process List. This option is not available from the
command line.
Show total memory usage
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Total Memory. Or, from the command line, run -dbgmemtot.
Show free memory list
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Free Memory. Or, from the command line, run –
dbgmemfree.
Show used memory list
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Memory Used. Or, from the command line, run –
dbgmemused.
Show memory usage per block
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Memory Block List. Or, from the command line, run –
dbgmemblk.
Show all memory statistics
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select All Memory Info. Or, from the command line, run –dbgmem.
Add remark to log file (enter the remark in the field, then click the button)
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Write Remark to Log. This option is not available from the
command line.
Display shared-memory information
In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug
Levels tab, select Display Shared Mem. This option is not available from the
command line.
Technical Manual
9-9
Executable programs
Miscellaneous
–vV : version information.
–r : show resources.
–deftext : show Bshell tex.ts.
–mdebug : display Bshell messages sent to display server.
–dbgref : show reference paths.
–dbgrefer : show references.
–dbgbdbact : show database actions.
–dbgenums : show loading of enums.
–dbgpty : debug pseudo terminals (pty).
–dbgorb : debug ORB integration (where available).
–set var=val : set environment variable var to val.
–logfile <file> : log stdout/stderr output in file.
–appendlog : append to logfile (only useful with –logfile option).
–nolog : stdout and stderr go to the controlling terminal.
–delay sec : delay for sec seconds before continuing.
bshcmd6.2
This command can be used to change the log facilities of the Logic Server
(bshell) or kill one or more bshell processes. The actions done with this
command are performed while the bshell is runing.
SYNOPSIS
bshcmd6.2 [options] <bshell_pid>
Possible options:
–v : print version information.
–p : show process list.
–m : show memory usage.
–d <dbglvl> : set DEBUG_LEVEL to (octal) <dbglvl>.
Technical Manual
9-10
Executable programs
0000100000 : show whether domains, data definitions and objects are loaded
from disk or shared memory.
0000200000 : debug get.var & put.var functions.
Technical Manual
9-11
Executable programs
–W sec : Wait until the previously issued command is executed. After this the
previous command is overwritten.
–w sec : Wait sec seconds for bshell to execute command.
–u sec : Send SIGUSR1 to bshell (wakeup). Only to be used in combination with
–w option. Waits sec seconds to see if the command is executed.
–s : Show entire contents of log file (if accessible).
Only to be used in combination with –p and –w option.
-l : Print log file name of bshell.
Only to be used in combination with –p and –w option.
-T cmdstr : Modify BDB_DEBUG or TT_SQL_TRACE (bshell) and DBSLOG,
TT_SGL_TRACE, {DBMS}STAT (drivers) tracing variables. cmdstr can
contain multiple commands of the form:
trace variable=value: set variable to value
trace variable+value: add bits to variable
trace variable-value: remove bits from variable
REMARKS All output is stored in the bshell's log file (default: $BSE_TMP/bshell.pid).
Only one command can be active at a time. New commands overwrite previous
ones.
Check the return value to see if a command has been processed.
The bshell_pid process number is a member of the output of the UNIX ps
command.
EXAMPLES bshcmd6.2 –s –p –w 10 <bshell_pid>
Show the process list, and wait 10 seconds for a response. If no actions are done
within 10 seconds, no output is given.
bshcmd6.2 –d 02000 <bshell_pid>
Set DEBUG_LEVEL to 02000.
bshcmd6.2 –M "Hello" –u 10 –w 10 <bshell_pid>
Send a message to a specific bshell.
bshcmd6.2 –k <pid> <bshell_pid>
Kill the bshell process <pid>. The <pid> process number can be accessed from
the shell program (ttstpshell) with the ps command.
bshcmd6.2 –T “TT_SQL_TRACE+02000” <bshell_pid>
Set TT_SQL_TRACE to log interface calls.
Technical Manual
9-12
Executable programs
badmin6.2
Used to perform administration of the bshell. The usage is as follows: badmin6.2
[-UuVv] [-qo outfile] [-qe errfile] –chkuser <user> | –chkgroup –ostype
Available options are:
–U or –u : print usage.
–V or –v : print release number.
–qo outfile : redirect standard output to file outfile.
–qe errfile : redirect error output to file errfile.
–chkuser user : returns a 0 if user exists, otherwise returns a 1.
–chkgroup group : returns a 0 if group exists, otherwise returns a 1.
–ostype ostype : returns 0 if operating system is ostype, otherwise returns a 1.
ostype can be either NT or UNIX.
Installation
cmt6.2
Script for component merge tool. Used to migrate the sources from user-
customized applications to new BaanERP versions.
install6.2
Script for installing the BaanERP software.
install.help
ASCII file containing Help for the installation procedure.
sh_server6.2
Shell server used to execute system-dependent commands.
bsp.setperm6.2
Script used to assign the correct permissions to all the BaanERP software.
binperm6.2.
Script used to assign the correct permissions to binaries in the $BSE/bin
directory after a new porting system is set up.
Technical Manual
9-13
Executable programs
Development
bic6.2
Program compiler for Baan C compiler.
repgen6.2
Report generator.
std_gen6.2
4GL-program preprocessor.
bic_cstub6.2
Converts a BaanERP library to a C library.
bic_info6.2
Shows information for a specified object.
bic_jstub6.2
Generates a Java class from a BaanERP DLL object.
License management
brand6.2
Program to authorize an environment. You must be logged on as the root user to
run this program.
hostid6.2
Program to print the host identification number.
Available options:
–vV : version information.
–o : print this number in an octal format.
–h : print this number in a hexadecimal format.
licd6.2
Daemon process to watch over the license. Because sockets are used, the ethernet
software must be installed before you can use the license daemon.
The $BSE/lib/licence6.2 file must contain the name of the host on which the
license daemon is running, as follows:
Host name (must be present in /etc/hosts).
Internet address (x.x.x.x).
Note that brand6.2 expects to find the host name in licence6.2.
Technical Manual
9-14
Executable programs
Available options:
–vV : version information.
–d : debug.
–f : keep licd6.2 running in foreground. This is useful with the –d option.
licmon6.2
Monitor to retrieve information from the license daemon. The options that can be
used when starting the monitor are:
–vV : version information.
–b : show brand information.
–B : show brand information from brand file and shared memory.
–C : clear brand information from shared memory. Use this option when shared
memory is incorrect.
–w : show users.
–W : show other connections.
–k : kill license daemon.
–u : show user count.
–s : show statistics.
–d : print debug information.
–h host : retrieve information from the given host.
–p n : ping the license server n times (test connection).
The commands that can be entered in the license monitor are:
brand information: show the brand information of this host.
help : show the available commands.
ping [n] : ping the license server [n times] (test connection).
quit : quit license monitor.
stats : show server statistics.
users : show user count who [all]: list users [all: list other logons].
Technical Manual
9-15
Executable programs
Resources:
licence_timeout : specifies the number of seconds the license daemon waits for a
reply from another license daemon, or the number of seconds a bshell waits for a
reply from the license daemon. The default is 30 seconds. Do not lower this
value. With wide area networks (WAN) it is advisable to set this value to 60.
You can change or set the licence_timeout setting in the resource file.
Printer management
filter6.2
Program to translate BaanERP native codes to printer codes used by the
pdaemon6.2 program.
lp6.2
System spooler interface for the pdaemon6.2 program.
pdaemon6.2
Daemon process to print requests from the environment. This program must be
started by the user root.
The options that can be used to call the printer daemon are:
–v : print version and porting information of the daemon.
–k : kill the running printer daemon.
–f : Start daemon as foreground process (for debugging).
–d n: Print debugging information to stderr. The higher n is, the more
information is output.
–r : Remove the lock file and start daemon (use this in rc.start).
–h : print the above options.
Resources:
maxproc: maximum number of background (filter) jobs. Default: 20.
maxtries: maximum number of minutes to retry opening the database files.
Default: 30 minutes.
sleeptime: sleep time between two polls. Default: 10 seconds.
shell_cmd: shell that runs the lp6.2 system interface. Default: /bin/sh.
strict: The interval in seconds that the printer daemon command (up/down) is
checked for all devices. If this resource is not set, the printer daemon command
of the device in question is checked as soon as a print job is found.
Technical Manual
9-16
Executable programs
Shared memory
shmmanager6.2
Manager program for shared memory. See the chapter “Shared memory
management.”
shmtimer6.2
Daemon process that stores and updates the current time in shared memory. See
the chapter “Shared memory management.”
shmvalues6.2
Program to generate entries for the "shm_param" file. See the chapter “Shared
memory management.”
srdd_init6.2
Program to load the data dictionary for the bshell from shared memory.
Network
client6.2
Test program of the client part.
fs6.2
Program to handle remote file I/O. With this program you can approach files on
another system. On the other system you must put the fs6.2 program in the
ipc_info file. See the chapter “Database management.”
ipc_boot6.2
Program to start remote processes. See the chapter “Database management.”
server6.2
Test program of the server part.
Technical Manual
9-17
Executable programs
Technical Manual
9-18
Executable programs
Technical Manual
9-19
Executable programs
Middleware
orb_srv6.2
Implementation program that supports the server portion of object request broker
(ORB) communication.
bshellorb6.2
Variation of the bshell used to integrate BaanERP with CORBA programs.
UNIX equivalents
compress6.2
Program to compress data. Equivalent to the UNIX compress command.
diff6.2
Program used to compare two files. Equivalent to the UNIX diff command.
kermit6.2
Serial communications program. Equivalent of the UNIX kermit command.
sort6.2
Sort program. Equivalent of the UNIX sort command. You can use the
environment variable BSE_SORT to specify a path where temporary files are
stored during the sort process.
Technical Manual
9-20
Executable programs
Miscellaneous
binput6.2
Program to read input. This can be used in shell scripts.
bput6.2
Program to set or print terminal settings.
encrypt6.2
Program to encrypt passwords, which is used to fill the r<user> file. See the
chapter “Database management.”
mirror6.2
Program for demonstrations and courses.
nlsedit6.2
Editor to maintain input and output conversion tables for Native Language
Support. See the chapter “Native language support.”
popup6.2
Program to handle popup screens. This can be used in shell scripts.
sum6.2
Sum program, used to calculate and patch executable programs.
Technical Manual
9-21
Executable programs
Technical Manual
9-22
10 Errors
General
There are three categories of errors:
Error numbers 1-99 are generated by UNIX.
Error numbers 100-899 are database errors.
Error numbers 900-999 are network errors.
Error numbers between 34 and 100 are system-dependent.
UNIX errors
1 EPERM Not owner
This error indicates an attempt to modify a file that cannot be modified, except
by its owner or a super user. This error also appears when ordinary users attempt
actions allowed only to the super user.
2 ENOENT No such file or directory
This error occurs when a specified file name should exist but does not, or when
one of the directories in a path name does not exist.
3 ESRCH No such process
This error means that no process can be found that corresponds to the one
specified.
4 EINTR Interrupted system call
This error means that an asynchronous signal (such as interrupt or quit), which
the user has chosen to catch, occurred during a system call. If the system resumes
execution after processing the signal, it will appear as if the interrupted system
call returned this error code.
5 EIO I/O error
This error means that there has been a physical I/O error. In some cases, this
error can point to the call following the one to which it actually applies.
6 ENXIO No such device or address
This error means that I/O on a special file refers to a subdevice that either does
not exist, or is beyond the limits of the device. It may also occur when, for
example, a tape drive is not online or no disk pack is loaded on a drive.
Technical Manual
10-1
Errors
Technical Manual
10-2
Errors
Technical Manual
10-3
Errors
Database errors
100 EDUPL
This error means that a duplicate value exists.
101 ENOTOPEN
This error means that the table is not open.
102 EBADARG
This error means that an illegal argument has been specified.
103 EBADKEY
This error means that an illegal key description has been specified. Use the
bdbpre and bdbpost tools.
Technical Manual
10-4
Errors
106 ENOTEXCL
This error means that the table is not exclusively locked action. You can either
wait until the lock on table is released or you can remove the lock yourself.
107 ELOCKED
This error means that the record you are trying to retrieve is locked. You can
either wait until the lock is released or remove the lock yourself.
108 EKEXISTS
This error means that the key already exists.
109 EPRIMKEY
This error means that you are trying to perform an illegal action on a primary
key. Refer to the log file for more information.
110 EENDFILE
This error means that the end of the file has been reached.
111 ENOREC
This error means that no record was found that matches the query criteria.
112 ENOCURR
This error means that there is no current record.
113 EFLOCKED
This error means that the table is locked. You can either wait until the lock is
released or you can remove the lock.
114 EFNAME File name too long
This error means that you are using a file name that is too long. Refer to your
system requirements to check the maximum length for a file name.
116 EBADMEM
This error means that the system cannot allocate memory because it is out of
memory. Try restarting the bshell as a possible solution.
117 EBADCOLL
This error means that there is a problem with the collating or sorting order.
123 ENOSHMEM
This error means that no shared memory is initialized. You can use, for example,
the rc.start script to initialize shared memory.
129 EUSER
This error means that too many sessions have been started.
136 ENOSPACE
This error means that there is no space in shared memory. You can either
initialize the shared memory, or change the shared memory parameters.
Technical Manual
10-5
Errors
140 ETRANSON
This error means that this operation is invalid when the transaction is on.
141 ETRANSOFF
This error means that this operation is invalid when the transaction is off.
142 EADMON
This error means that an administration process is running.
146 ENOSNAPSHOT
This error means that the system cannot take a snapshot of the database, probably
because it is locked by another user. You can either wait until the lock is released
or you can remove the lock.
148 EOFRANGE
This error means that there has been an error in the data-type range check.
201 EROWCHANGED
This error means that the record was changed after a delayed lock.
202 EDBLOCKED
This error means that the database is locked. You can either wait until the lock is
released or you can remove the lock yourself.
203 ETRANSACTIONON
This error means that this action is not allowed within a transaction.
204 EISREADONLY
This error means that this transaction is read only.
205 ENOTINRANGE
This error means that the field value is out of range and does not agree with the
domain definition.
206 ENOTLOCKED
This error means that the record is not locked.
207 EAUDIT
This error means that there is an error of the audit trailer.
208 EPERMISSION
This error means that the action you have just attempted is not allowed at this
time.
209 EMIRROR
This error means that there is an error in the mirroring of the database. The tables
are inconsistent. You can use bdbpre and bdbpost to copy the tables correctly.
Technical Manual
10-6
Errors
210 EMLOCKED
This error means either that the record is locked in the mirrored database, or that
the tables are inconsistent, or that the mirroring definition in tabledef6.2 is not
compatible.
213 ETRANSACTIONOPEN
This error means that the transaction is started, but not updated. This is an
internal bshell error.
214 EUNALLOWEDCOMPNR
This error means that an operation for mapping company numbers is not allowed.
If the logical company is not equal to the physical company, you are not allowed
to do a drop/clear table operation.
215 EDBDILLEGAL
This error indicates an illegal state that should never occur.
251 EAUDSETUP
This error means that the audit server setup is not correct. See the log.audit file
for more information.
252 EAUDCORRUPT
This error means that an audit file is corrupt. See the log.audit file for more
information.
253 EAUDLOCKED
This error means that the audit file is locked by another user. See the log.audit
file for more information.
254 EAUDABORT
This error means that a commit transaction has failed in the audit server action
See the log.audit file for more information.
301 ESQLQUERY
This is a general SQL error code. This error occurs when there is a problem with
the SQL syntax.
302 ESQLSYNTAX
This error means that the SQL syntax is not correct.
303 ESQLREFER
This error means that a reference in the query cannot be found.
304 ESQLUNDEFINED
This error occurs when something went wrong but no error code can be set.
Technical Manual
10-7
Errors
305 ESQLWRONGROW
This error means that a wrong record was returned. This probably means either
that the table index is corrupt or that the RDBMS has a different sorting order
than the BaanERP software.
501 EMEMORY
This is an internal memory error.
502 EBDBON
This error means that the user is already logged on.
503 EBADADRS
This error means that an illegal address has been used.
504 EBADFLD
This error means that a column is undefined.
505 ENOSERVER
This error means either that no server is specified in tabledef6.1, or that the
server cannot be started. See the log file for more information.
506 ENOTABLE
This error means that the table does not exist.
507 ETABLEEXIST
This error means that the table that you are trying to create already exists.
508 EBDBNOTON
This error means that you are not logged on to a database.
509 EBADCURSOR
This error means that you have a bad memory cursor or that a bad table pointer
has been specified.
510 EDBNOTON
This error means that the database is not on. Start the database to correct the
problem.
511 EWRONGVERSION
This error means that the version of client is not the same as the version of the
server.
512 EDDCORRUPT
This error means that the data dictionary is corrupt. Use bdbpre and bdbpost
tools to repair it.
513 ENODD
This error means that the data dictionary was not found.
Technical Manual
10-8
Errors
Technical Manual
10-9
Errors
605 EREFEXISTS
This error means that the record cannot be deleted while the reference exists. See
the log file for more information.
606 EREFNOTEXISTS
This error means that the reference does not exist.
607 ENOREFTBL
This error means that the reference table was not found. The data dictionary
might not be correct. See the log file for more information.
608 ENOREFCNT
This error means that no reference counter fields are present.
609 EUPDREFCNT
This error can occur when the reference counter is updated.
700 ESETLOCALE
This error can occur when you are setting the locale. See the log file for more
information.
If an error code greater than 1000 is displayed, the error can be retrieved as
follows, depending on the database driver used:
Informix/Oracle: error – 1000 gives DB error
Example UNIX
Error no: 11400
Error: 11400 – 1000 = 10400
UNIX error = 0 (last two digits)
Example Oracle:
Error no: 1979
Error: 1979 – 1000 = 979 Not a GROUP BY
NOTE When a fatal error occurs, more information is stored in the log files in the
$BSE/log directory. For example, if bdbpost causes an error, it is reported in the
log.bdbpost file.
Technical Manual
10-10
11 Shared memory management
General
Shared memory is a part of the internal memory intended for common usage. All
users can read from and write to it. In BaanERP Tools the shared memory
contains part of the data dictionary.
A prerequisite for shared memory is that it must be supported by the hardware
and there must be sufficient internal memory available.
This chapter describes the way shared memory can be used for BaanERP Tools.
Technical Manual
11-1
Shared memory management
–r: resetting of shared memory. Removes all data from shared memory except
the first segment. You do not have to reinstall shared memory afterwards. The
result of this option is the same as when using –k option followed by –i option.
You can only use this option if all processes that use shared memory have
finished. If not, the system displays a message:
# of attaches = <number>
Cannot remove ..# of attaches not equal to zero
The –a, –i, and –v options are discussed in the section “Installation of shared
memory.”
Technical Manual
11-2
Shared memory management
To use shmvalues6.2
The shmvalues6.2 program finds the boundaries of shared memory by itself and
generates a default entry, which you can include in the shm_param parameter
file. For example:
default:;
{
}
Machine_id:;
{
}
Machine_id/OS release:;
{
SHM_START = a40000
SHM_STEP = 80000
SHM_BUFSIZE = 512
SHM_MAXMEM = 10
}
SHM_START is the start address of the first shared-memory segment.
SHM_STEP is the difference between the start addresses of two consecutive
segments.
SHM_BUFSIZE is the size of a segment in KB.
SHM_MAXMEM is the maximum number of segments.
The syntax for shmvalues6.2 is:
shmvalues6.2 [-dvV] [-m Seg_size_in_MB] [-s Seg_size_in_KB]
Possible options are as follows:
–d : the –d option provides you with additional information through error
messages when the boundaries of the operating system are exceeded.
–m : the shmvalues6.2 program first tries to allocate 4 MB of memory to make
sure enough memory is left after shared memory has been installed. You can use
the –m option to increase or decrease the amount of allocated memory. You
specify it in megabytes, that is, –m 3 = 3 MB.
Technical Manual
11-3
Shared memory management
To use shmmanager6.2
If you cannot determine the shared-memory parameters by using shmvalues6.2,
you can use the shared memory manager. This takes longer, but it yields more
information on the addresses of the segments and on the instances where errors
can occur.
Execute the shmmanager6.2 with the –a option.
You are prompted for the number of kilobytes to be allocated and the number of
segments to be created. For the bshell, specify 4096 KB and 10 segments
respectively.
Technical Manual
11-4
Shared memory management
For example:
# shmmanager6.2 –a
No. of kbytes to be malloc: 4096
No. of shm segments to be created: 10
addr[0]: 0xa40000 id[0]: 40 < SHM_START = a40000
addr[1]: 0xac0000 id[1]: 41
addr[2]: 0xb40000 id[2]: 42
addr[3]: 0xbc0000 id[3]: 43
addr[4]: 0xc40000 id[4]: 44
addr[5]: 0xcc0000 id[5]: 45
addr[6]: 0xd40000 id[6]: 46
addr[7]: 0xdc0000 id[7]: 47
addr[8]: 0xe40000 id[8]: 48
addr[9]: 0xec0000 id[9]: 49 < SHM_MAXMEM = 10
step 0x80000 < SHM_STEP = 80000
step 0x80000
step 0x80000
step 0x80000
step 0x80000
step 0x80000
step 0x80000
step 0x80000
step 0x80000
step 0x80000
ret 0
Technical Manual
11-5
Shared memory management
NOTE During installation the BSE shell variable must be the same as the one for the
bshell users. You can avoid installing shared memory manually each time by
including the installation in your system’s start-up procedure. If the BSE variable
is not /usr/bse, it must be set during the start-up procedure and shmmanager6.2
must be started with the –I option.
To start shmtimer6.2
The UNIX time() function is a system call often called in database servers. On
multiprocessor systems, use of the time() function can be quite heavy. Even
though a process can run successively on different processors, this must be
invisible to the process. The process requires that each processor returns the
same time, using time(). Therefore, the processors have to synchronize their
internal clocks every time the time() function is called.
The shmtimer6.2 program can prevent this overhead. shmtimer6.2 is a daemon
process that writes the current time in shared memory. The time is updated every
second. This reduces the number of calls of the time() function to a maximum of
one per second.
When shared memory (shmmanager6.2 –i) is initialized, the shmtimer6.2
program starts. When shared memory is removed (shmmanager6.2 –k), the
shmtimer6.2 stops first. The following options can be used for shmtimer6.2:
–i : Initialize shmtimer6.2
A shmtimer6.2 program is started, and runs in the background.
–k : Kill shmtimer6.2
The running shmtimer6.2 program is killed. The allocated shared memory is
cleared, but not removed.
–s : Show status as stored in shared memory:
− The current time
− The process ID of the running timer
–u : Show information about shmtimer6.2
Technical Manual
11-6
Shared memory management
No more space
# shmmanager6.2 –a
No. of kbytes to be malloc: 4096
no more space
abort – core dumped
This error happens because some computer systems put a limit on the amount of
virtual memory (MAXUMEM) used by a process. Hence the shared memory
manager cannot be capable of allocating 4096 K.
Solution: Adjust the kernel parameters. See the section “Kernel requirements.”
Technical Manual
11-7
Shared memory management
Technical Manual
11-8
Shared memory management
Syntax srdd_tab
The srdd_tab6.2 file can be divided into several sections. Each section is
indicated by the package combination for which components must be loaded into
shared memory. For example:
package=31Sa
This parameter means that the components below this line belong to package
combination 31Sa.
After this line the domains are specified first. For example:
dti.pd
dtt.pd
The following data is the table definitions. For example:
dttaad000
dttaad001
After that the objects must be placed. For example:
ottstpconv
ottstpdisplay
So the syntax must be:
package={pc}
for domains: <d{p}.pd>
for data definitions: <d{p}{t}>
for objects and reports: <o{p}{m}{o}>
The abbreviations are:
{pc} package combination
{p} package
{m} module
{t} table
{o} object (program/report)
You can also read parts of a data dictionary on a remote system into shared
memory. To do this, write the host name of the remote system at the beginning of
a line. For example:
${BSE}/standard6.2/ddbaan/dti/dti.pd
ibm1!/usr3/bse/standard6.2/ddbaan/dtd/dtd.pd
${BSE}/standard6.2/ddbaan/dttadv/dttadv100
${BSE}/standard6.2/ddbaan/dtppdm/dtppdm100
/usr2/bse/standard6.2/ttB40_a_CP/ottadv/oadv1100
If the srdd_tab6.2 file contains a redirection to a remote system, a remote user
file must be available for the user who executes srdd_init6.2.
Technical Manual
11-9
Shared memory management
Technical Manual
11-10
Shared memory management
Kernel requirements
General description of adjusting UNIX kernels
Static kernels
The kernel of a UNIX system is a program that runs from booting to shutting
down. The kernel performs all actions in which user programs access resources.
Internally, the kernel keeps lists of the actions that are executed simultaneously.
Because those lists have limited capacity, a very large number of simultaneous
actions can cause an overflow.
When there is an overflow, the kernel cannot process any new actions.
Consequently, when another action is added to the list the system displays an
error message. For example, if the number of files opened at the same time is
greater than permitted by the kernel, the system responds with error message 23
(ENFILE File table overflow).
To avoid this error message, the user can create a new kernel that allows a larger
number of files to be opened simultaneously. The kernel is stored on the system
in different forms.
First, it includes sources, libraries, an include file and, most importantly, a file
containing kernel parameters.
Second, the kernel is present as an executable and can be generated from the
previously-mentioned files.
Third, a kernel runs in the internal memory.
Adjusting the kernel requires a three-step procedure:
1 Adjust the file with kernel parameters.
2 Generate the kernel as an executable from the parameter file.
3 Reboot the computer, allowing the new kernel to be loaded into internal
memory and be started.
Technical Manual
11-11
Shared memory management
Dynamic kernels
With a static kernel, boundaries are set through a kernel parameter. With a
dynamic kernel, the user can adjust boundaries during run time. The kernel of an
IBM system is fully dynamic (except for a few parameters), so the user does not
have to reboot the computer to activate changes. You can use a command to
modify the kernel of an IBM while the system is still running. Furthermore, the
kernel is automatically adjusted if the required number of resources is greater
than permitted by the kernel.
The kernels of Digital and Sun systems are semidynamic. When the system is
booted, some kernel parameters are read from a file and the kernel is adjusted
accordingly. The user can adjust other parameters while the kernel is running.
Kernel parameters
The recommended values for the parameters presuppose the following
conditions:
A standard BaanERP installation.
One active session per bshell.
You can use the sar command while working in BaanERP to keep track of
parameter usage and adjust the parameters where necessary. This is of particular
interest for BaanERP customization. When using other databases, take into
account the kernel tuning references from the corresponding documentation.
NOTE When using raw devices, you must set the parameters relating to the cache such
as NBUF or BUFPAGES to low values, according to the database-specific
documentation, not to the relatively high values suggested in this document.
The following descriptions for parameters refer to the number of users. If there is
more than one active session per bshell, instead of number of users, read number
of active sessions.
Processes
NPROC
The NPROC parameter specifies the maximum number of processes that can be
run simultaneously in the system.
NPROC = 64 * users & NPROC = 1.1 * MAXUP
Adjust: error 11
Technical Manual
11-12
Shared memory management
MAXUP
The MAXUP parameter specifies the maximum number of processes that can be
run per logon code. This restriction does not apply to the super user. If several
users log on using the same logon code, those users must share this number of
processes.
MAXUP=64
Adjust: error 11, message 'fork failed: too many processes'
REGION, NREGION
The REGION parameter specifies the maximum number of program regions that
can be active at the same time. Each UNIX process has at least three regions:
text, data, and stack. The text part is shared if a program runs more than once.
Shared memory also uses the region resources.
REGION=3* * NPROC
Files
NFILE
The NFILE parameter specifies the maximum number of files that can be
opened simultaneously on the system.
NFILE = 512 * users
Adjust: Message “ file table overflow”
The command sar –v 1 1 shows the number of open files and the maximum
number of files to be opened, under the file-sz header.
NOFILES, SFNOLIM(SVR4), MAXFILES (HP)
The NOFILE parameter specifies the maximum number of files that can be
opened per process.
NOFILES >+ 256
Adjust: error 24, Too many connected sessions (INGRES).
On an SVR4 system the user can use not only the sfnolim kernel parameter, but
also a command to change the maximum number of open files per process. That
command is “limit – 256”, including the quotation marks. This new value only
applies in this shell.
Technical Manual
11-13
Shared memory management
Buffers
NBUF
Under SVR3 and SVR4, the NBUF parameter has a different meaning.
SVR3
The NBUF parameter specifies the number of system buffers available for
block I/O.
NBUF = 1/3 of total internal memory (SVR3)
NBUF = 0 (HP)
SVR4
In UNIX SVR4, buffers contain only indexes, superblocks, and file header
information. They do not contain file data. The actual file data is stored in
pages of virtual memory. The amount of virtual memory available for this
purpose is determined by the SEGMAPSZ parameter.
The NBUF parameter specifies the number of system buffer headers available
for block I/O.
NBUF = default, for example, 100
Adjust: Performance problems (sar –b)
NHBUF
The NHBUF parameter specifies the number of hash table entries that can be
allocated in the system.
NHBUF = 1/5 * NBUF
Adjust: Performance problems
BUFPAGES
The BUFPAGES parameter specifies the number of pages in the file’s system
buffer cache.
BUFPAGES = 1/3 of total internal memory) /4096, (HP)
Adjust: Performance problems
SEGMAPSZ
The SEGMAPSZ parameter specifies the size of the bitmap for file I/O. This
map determines the number of 4K pages and therefore the amount of memory
available for the I/O file. If the value is 0, the kernel calculates the value as a
function of the amount of physical memory.
SEGMAPSZ = 0 or 1/x of total internal memory.
Adjust: Performance problems
Technical Manual
11-14
Shared memory management
BUFHWM
The BUFHWM parameter specifies the maximum amount of memory, in
kilobytes, that can be used by block I/O buffers. If the value of BUFHWM is 0
(the default), the kernel sets the value of the I/O buffers to 25% of available
memory.
Shared memory
SHMALL
The SHMALL parameter specifies the maximum amount of shared-memory text
segments that can be created.
SHMALL = SHMNI
Adjust: error 24
SHMMAX
The SHMMAX parameter specifies the maximum size, in bytes, of a shared-
memory segment that can be created. Several shared-memory segments of this
size can be created in an environment per process.
SHMAX >= SHM_BUFSIZE (in $BSE/lib/shm_param)
SHMMIN
The SHMMIN parameter specifies the maximum size of a shared-memory
segment in bytes.
SHMMNI = SHMSEG * ENVIRONMENTS
Test with: ipcs –m
SHMSEG
The SHMSEG parameter specifies the maximum number of shared-memory
segments that can be used by a process.
SHMSEG = 30
Adjust: error 24
Semaphores
SEMMAP
The SEMMAP specifies the number of entries in the control map used to
manage semaphores. This map is used to keep track of free areas in the system
pool of semaphores.
SEMMAP = SEMNI +2
Adjust: Message “Mfree map overflow”
Technical Manual
11-15
Shared memory management
SEMMNI
The SEMMNI parameter specifies the maximum number of semaphore
identifiers in the kernel. This is the number of unique semaphore sets that can be
active at any given time.
SEMMNI = 32 * users
Adjust: error 28
SEMMNS
The SEMMNS parameter specifies the maximum number of ipc –sb semaphores
permitted in the system.
SEMMNS = SEMMNI
Test with: “ipc –sb”
SEMUME
The SEMUME parameter specifies the maximum number of undo entries per
undo structure. Each undo entry represents a semaphore that has been modified
with the undo option specified in the semop(2) system call.
SEMUME = 10
Adjust: error 22
Message
MSGMAP
The MSGMAP parameter specifies the number of entries in the control map, for
example 100, used to manage message segments. Each entry in this map
represents a free area in the message buffer area.
MSGMAP = default
Adjust: Message “mfree map overflow”
MSGMAX
The MSGMAX parameter specifies the maximum size of a message in bytes. If
the protocol m (message queues) is used in the $BSSE/lib/ipc_info file, the value
must be set to 4096.
MSGMAX = 4096 & MSGMAX <= MSGMNB
MSGMNB
The MSGMNB parameter specifies the maximum length, in bytes, of a message
queue.
MSGMNG = 4096
Check with: ipcs –qo
Technical Manual
11-16
Shared memory management
MSGMNI
The MSGMNI parameter specifies the maximum number of message queues
that can be used on the system.
MSGMNI=32 *users
Adjust: error 28
MSGSEG
The MSGSEG parameter specifies the number of message segments permitted
on the system, for example 1024. Each message on a message queue consists of
one or more message segments. The size of each segment is specified by the
MSGSSZ parameter.
MSGSEG = default
MSGSSZ
The MSGSSZ parameter specifies the size, in bytes, of a message segment, for
example, 8. Each message consists of a contiguous set of message segments large
enough to hold the text of the message.
MSGSSZ = default
MSGTQL
The MSGTQL parameter specifies the maximum number of message headers, in
other words, the maximum number of open messages.
MSGTQL = 32 * users
Technical Manual
11-17
Shared memory management
NINODE
The NINODE parameter specifies the maximum number of inodes that can be
used in the SV file system. This includes open files, used pipes, and the current
directory. The UFSNINODE parameter specifies the number of inodes for the
UFS file systems.
Technical Manual
11-18
12 Remote databases
General
The client/server architecture as supported by BaanERP enables the user to work
with several database types. These databases can be distributed over one or
multiple systems. A remote database configuration is one where an application
server (bshell) and the database are not on the same system.
The possible reasons for setting up a remote database configuration are:
System performance
If all users start the application on the same system, the CPU is primarily
occupied by the bshell and the display server. You can divide the load by
letting the users work on local systems and keeping the database on a remote
system.
Lack of disk space on local system
If all tables cannot be stored on the same system due to a lack of disk space,
some of the tables can be installed on a second system.
Distributed applications
For practical reasons you can decide to install the application tables on
different systems per application.
Mirrored databases
For security reasons database actions can be carried out on two systems
simultaneously by using database mirroring.
This chapter describes how to set up a remote database configuration and also
explains how to use it.
Technical Manual
12-1
Remote databases
In figure 8, the user interface and the application logic (bshell) are both installed
on the local host. From version 6.1 forward, they can be installed on different
systems.
Assuming that all tables are installed on a remote system and the user interface
and application logic (bshell) are installed locally, the following files must be
available for the system to work normally:
Technical Manual
12-2
Remote databases
Local host
On the local host, the following files and directories must be present:
$BSE/bin:
audit_srv6.2 hostid6.2
ba6.2 kermit6.2
badmin6.2 licd6.2
Bdbpost6.2 licmon6.2
bdbpre6.2 lp6.2
Bdbreconfig6.2 nlsedit6.2
bic6.2popup6.2 pdaemon6.2
bic_cstub6.2 qcommand6.2
bic_info6.2 qptool6.2
Binperm6.2 refint6.2
binput6.2 repgen6.2
bput6.2 rz6.2
brand6.2 shmmanager6.2
Bshcmd6.2 shmvalues6.2
Bshell6.2 sort6.2
bsp.setperm6.2 srdd_init6.2
client6.2 std_gen6.2
Compress6.2 sum6.2
encrypt6.2 sz6.2
Explode6.2 tsscomp6.2
filter6.2 tsscvt6.2
Gcommand6.2 tssinfo6.2
$BSE/lib:
tabledef6.2
fd6.2.<package_comb> (optional)
ipc_info
/user/r<user>
$BSE/etc:
rc.start
rc.stop
$BSE/tmp
$BSE/log
Technical Manual
12-3
Remote databases
Remote
It is recommended that you install the complete $BSE environment on the remote
system. If no application is started on the remote system, executable programs
such as bshell6.2 and ba6.2 do not need to be installed there. It is practical if one
or more users can run the application locally on the remote system. For this
reason the application must be run on the remote system. That is why the entire
BSE environment must be installed there.
The remote system must include at least the following files:
$BSE/bin:
fs6.2
ipc_boot6.2
database_servers with associated executable programs, such as ora7_srv6.2
installation and validation programs, such as install6.2, licd6.2, and so on.
$BSE/lib:
tabledef6.2
user/u<user>
ipc_info
driver-specific directory, for example, ora
fd.6.2.<package_comb> (optional)
$BSE/etc – rc.start
rc.stop
If these files are available on the local and the remote system, respectively, you
can adapt the following files. The data dictionary contains sessions where you
can adapt the files. It is better to adapt the files in the sessions in the data
dictionary and not directly in the files themselves.
Local
On the local system the following files are configuration dependent:
tabledef6.2 Database Definitions (ttaad4510m000) and Tables by Database
(ttaad4111m000)).
u<user> Remote User Data (ttaad2500m000).
r<user> Remote User Data (ttaad2501m000).
Technical Manual
12-4
Remote databases
tabledef6.2
Start the application by executing the user interface (UI). The UI then starts the
application logic (bshell), which reads the tabledef6.2 file to search for the table
location and database type. Tables can be stored on a local or remote system,
which is also indicated in this file.
The tabledef6.2 file is filled using the Database Definitions (ttaad4510m000) and
Tables by Database (ttaad4111m000) sessions. These sessions indicate whether
tables are installed on a remote database.
The tabledef6.2 file is located in the $BSE/lib directory. For more information
about tabledef6.2, refer to the help text for Database Management business
object.
You can specify whether each table is installed locally or remotely by entering
the remote system name in the System Name field in the Database Definitions
(ttaad4510m000) session. Then, use the Tables by Database (ttaad4111m000)
session to assign tables to this table definition.
For example, assume that all tables are installed on the host1 remote system. This
means that tabledef6.2 on the local system must contain the line: *:*:host1:N.
If all tables are on a remote system, you can set the BSE_REM variable on the
local system. If there is no tabledef6.2 file on the local system, the bshell
searches for this on the remote system, otherwise it reads the local tabledef6.2
file. The variable BSE_REM indicates the remote system:
BSE_REM=host1
User files
To start an application, every user (logon) must have a user file. The bshell reads
this user file to test whether the user is authorized to start the application. The
Remote User Data (ttaad2501m000) session creates the $BSE/lib/user/r<user>
file.
If all tables are installed on the remote system, the user files can be installed
there, too, instead of on the local system. In that case you can set the BSE_REM
system variable with the system name of the remote system, for example,
BSE_REM=host1. The bshell looks first in the local $BSE/lib directory. If it
cannot find the needed files there, it uses the BSE environment ($BSE/lib) on the
remote system.
Technical Manual
12-5
Remote databases
The remote system now reads the u user user file. To access tables on a remote
system, you need to log on to the remote system. This is done using a remote
logon user file named r user. You create this file with the Remote User Data
(ttaad2501m000) session. Read session Help for information on how to create
this file.
Variant I
Two variants of r user are possible. If the user’s logon is the same on the local
and the remote system, variant I is sufficient. Define the remote system, the path
on that system, and the password to log on to the remote system.
In variant I, the following information is needed:
Name of the remote host.
BSE path on the remote host.
Encrypted password on the remote host.
EXAMPLE A user peter wants to work with BaanERP on his local workstation. The database
tables he wants to use, however, are located on a remote system called host. To
access the remote data, he needs a rpeter file in the $BSE/lib/user directory. If
all tables are located on the remote system, he sets the following system variable:
BSE_REM=host1
This makes sure that everything is read from the remote BSE environment except
the bin directory.
When using Variant I, user peter must have a logon entry on the remote system.
The r user file must contain the name of the remote system, the path of the BSE
on the remote system and the user’s encrypted password for the remote system.
Variant II
A second variant of r user allows you to log on to the remote host using another
logon code. Indicate whether the UNIX and BaanERP permissions must be
inherited from the other user. If so, the user u user file on the remote system
must have the same UNIX logon as on the local system.
In variant II, the following information is needed:
Name of the remote host.
BSE path on the remote host.
Logon name on the remote host.
Encrypted password on the remote host.
SUID inherited logon.
The remote user file can contain more than one line.
Technical Manual
12-6
Remote databases
When using variant II, you can also specify a logon code to access the remote
system. This can be a different logon code than “peter,” for example “john.”
After that you enter the encrypted password for the remote logon (john). The
remote system must still have a upeter user file.
Variant II also allows you to take the UNIX and/or BaanERP authorizations
defined for the john logon. To do so, specify Yes or No for the SUID and
Inherit Logon fields. SUID switches the user ID from peter to john. Inherit
Logon makes sure the BaanERP authorizations defined for john also apply to
peter.
To switch the user ID, the ipc_boot6.2 ($BSE/bin) file must have UNIX root
permission and the s-bit must be set. From a security point of view this is not
advisable.
Here is an example of the two variants:
Variant I:
host1 /usr2/bse NZ+,AHtg&#K-kt"Q{$=Y3-"VLDN'CRtZ
host2 /usr1/t/bse h8i0_-+8yujg@#c67h78i\{}907h67h5R
Variant II:
host1 /usr2/bse john NZ+,AHtg&#K-kt"Q{$=Y3-"VLDN'CRtZ no yes
host2 /usr1/t/bse h8i0_-+8yujg@#c67h78i\{}907h67h5R yes yes
Remote
Whenever a local system connects to the remote system, ipc_boot6.2 is the first
program to start. That process in turn starts fs6.2, which can read tabledef6.2 on
the remote system. It finds an entry in tabledef6.2, showing the database type for
a range of tables to be accessed.
A database server is started, for example, ora7_srv6.2. The path for both fs6.2
and the database server is read from the $BSE/lib/ipc_info file.
Once on a remote system, you cannot call a third system. This means that
tabledef6.2 must always have an entry on the tables.
Technical Manual
12-7
Remote databases
Technical Manual
12-8
13 Multibyte management
General
The currently used 8-bit wide character space is not large enough to fit most
Asian character sets. Asian countries such as Japan, China, and Korea need at
least 16 bits of character space to accommodate local characters. Therefore a 32-
bit wide character space has been implemented in BaanERP Tools to support all
possible character sets.
Be aware that a character is not necessarily the same as a byte and can take up
more than one screen position. A character in the bshell occupies one or two
screen positions at a size of 4 bytes.
Technical Manual
13-1
Multibyte management
The characters 0x00 – 0x20 and 0x7F – 0x9F cannot be included in the sets,
because these ranges contain control and escape codes. This leaves the following
ranges:
0x212121 – 0x7EFFFF
0xA12121 – 0xFFFFFF
To distinguish TSS characters, the character contains the prefix 0x9B. Hence the
complete TSS ranges are:
0x9B212121 – 0x9B7EFFFF
0x9BA12121 – 0x9BFFFFFF
Code Features (CF) and Line Drawing Characters (LDC) have been implemented
in the code range of ISO-8859/1 as follows:
Line Drawing Characters | 0x80 – 0x8A
Code Features | 0x8B – 0x9A
TSS Lead byte | 0x9B
Reserved | 0x9C – 0x9F
These code ranges do not conflict with the currently implemented EUC character
sets, but they can cause problems when you import these codes. Also, these
codes overlap with SHIFT-JIS trailing bytes, causing import conversion errors.
Therefore the code ranges are translated into ASCII characters (0x00-0x7F)
during the export phase and are converted back into the correct LDC and CF
characters during the import phase.
Currently assigned planes are:
Character set Page Range from Range to Remarks
KANJIEUC/SHIFTJIS 0x21 212121 217e7e JISX0208-1983
KANJIEUC/SHIFTJIS 0x23 2321a1 2321df JISX0201-1976
CCDC_HP15 0x24 24a121 24fe7e CCDC
GB2312-80 0x25 25a1a1 25ffff GB2312-80
GB2312-80 0x26 26a120 26a17f Extended GB
BIG5 0x27 27a140 27f9d5
CNS11643 0x28 28a1a1 28fefe CNS11643 Plane 1
CNS11643 0x29 29a121 29fe7e CNS11643 Plane 2
HEBREW 0x30 3021a0 3021fa ISO-8859/8
Technical Manual
13-2
Multibyte management
Utilities
This section describes the available programs that belong to BaanERP Super Set.
These programs are present in the $BSE/bin directory.
tsscomp6.2
NAME
tsscomp6.2
This program compiles and checks the tss6.2 TSS information file. This program
is executed by the Convert TSS Data to Run Time (tttss0103m000) session.
SYNOPSIS
tsscomp6.2 [-svV] [-e error file] [-d debug level] [–i input file] [–o output file]
Technical Manual
13-3
Multibyte management
DESCRIPTION
tsscomp6.2 compiles the tss6.2 file, which contains the descriptions of all
supported character sets into a fast-loading tss_c6.2 binary file. It also performs
several checks on the entered data of the character sets.
The available options are:
-s Suppress output of errors. Check the exit value to determine if the
program has been successful.
-e Write all warnings and errors to the file-error file.
-vV Prints version and porting information.
-d Used to provide some debugging information. This is a bit set.
-i Optional input file. Default $BSE/lib/tss6.2.
-o Optional output file. Default $BSE/lib/tss_c6.2.
Return values:
0 = success
> 0 = failure
tsscvt6.2
NAME
tsscvt6.2
TSS conversion filter.
SYNOPSIS
tsscvt6.2 [-vV] [-dow] [-l locale]
DESCRIPTION
This program converts multibyte characters strings into TSS strings or vice versa.
The input/output character set can be set using the –l option, but is read from the
user file (locale resource) if not given.
Use the –o option to convert from TSS to the native character set.
The available options are:
-vV show version and porting information.
-d show some additional debug information.
-w Do not accept any conversion warnings, but exit(1) instead.
Technical Manual
13-4
Multibyte management
Return values:
0 = success
> 0 = failure
tssinfo6.2
NAME
tssinfo6.2
This program offers information about the current settings such as your TSS
locale, NLS locale, character set information, and so on.
SYNOPSIS
tssinfo6.2 [-vV] [-sf] [-l locale]
DESCRIPTION
The available options are:
-vV show version and porting information.
-s show character set definition of TSS locale.
-f show font assignments.
-l show information about the given locale. This is read from the user file
if not given.
EXAMPLE Command: tssinfo6.2 –sf
User : bsp
TSS locale : KANJIEUC_AIX32
TSS character set : KANJIEUC
NLS locale : ja_JP
Factor :1
Multibyte strings:
Database min. : 0x1
Database max. : 0x9b217e7e
Forms min. : 0x20
Forms max. : 0x9b217e7e
Single byte strings:
Database min. : 0x1
Database max. : 0x7f
Forms min. : 0x20
Forms max. : 0x7a
Technical Manual
13-5
Multibyte management
NATIVE TSS
From To from to
1 7f 1 7f
8ea1 8edf 9b2321a1 9b2321df
a1a1 fefe 9b212121 9b217e7e
Font assignments
Technical Manual
13-6
Multibyte management
Technical Manual
13-7
Multibyte management
Technical Manual
13-8
Multibyte management
Locale information
The tss_locale6.2 file in the $BSE/lib directory contains all possible TSS locales
that can be defined in the user file or specified with special commands, such as
tsscvt6.2 –l locale. This file is filled by the Maintain Locale Data
%SEtttss0104m000) session. The format is as follows:
Locale, Charset, NLS_locale, MBdbLow, MBdbHigh, MBFormLow, \
MBFormHigh, SBdbLow, SBdbHigh, SBFormLow, SBFormHigh
Locale As specified in the user file.
Charset Any of the character sets defined in tss6.2.
NLS_locale The NLS locale. Mainly used for character collation. May be
NULL.
MbdbLow The lowest possible multibyte character value for database
storage.
MBdbHigh The highest possible multibyte character value for database
storage.
MBFormLow The lowest possible multibyte character value for forms (see
the expr function).
MBFormHigh The highest possible multibyte character value for forms (see
the expr function).
SBdbLow The lowest possible single byte character value for database
storage.
SbdbHigh The highest possible single byte character value for database
storage.
SBFormLow The lowest possible single byte character value for forms (see
the expr function).
SBFormHigh The highest possible single byte character value for forms (see
the expr function).
EXAMPLE # Japanese – HPUX 9.0
KANJIEUC_HPUX: KANJIEUC, Japanese.euc, 1, 65278, 32, \ 65278, 1, 127, 32, 122
# \ is used here to indicate that the line following this character must actually be
in the same line.
The $BSE/lib/locale directory contains files having names identical to the locale
names, with character set information used to display the character set ranges. A
set is chosen by the setno entry in the tss6.2 character set description file. These
files are managed by the Fonts (tttss0106m000) session.
Technical Manual
13-9
Multibyte management
Technical Manual
13-10
14 Audit management
General
This chapter introduces the audit management facility provided with BaanERP
Tools from Version 6.0 onward. It describes the audit server, the audit
management utility, and where audit-data is stored. It also describes the structure
of the audit files and how to give users permissions to print, maintain, or clean
audit-data.
Technical Manual
14-1
Audit management
Architecture
The following diagram shows the audit selector and audit server in a process
model.
table c onverted
L eg end : al l da tab ase au di t to runtim e (file)
ch an ges se lec ti on s
7
Pro ce ss tran sac ti on
no tifica tion
database c lient lay er (bs hel l) 1.1 database t able(s)
au di t
D ata se lec to r 8
co mmi t
tran sac ti on
1 3
ipc ipc
mes sage ch an ge to b e message pr epa re ac kno wl ed ge- ipc
message
au di ted co mmi t me nt
ipc
message
4
se qu enc e id 1.2
re que st au di t
se rver
1.3
se qu enc e
ge ne rato r
2
fi les
5 au di t tra il
se qu enc e
id
ipc
message
Auditing Process
The process can be described as follows.
The audit selector (database client layer of the bshell) checks whether each
change on the source database meets the audit selections. If so, the audit selector
sends a change to be audited (ipc message) to the audit server.
The audit server writes each change it receives to the audit trail (files). The audit
server writes all changes for a transaction and then prepares the commit. The
audit server requests a transaction ID from the sequence generator. Because the
audit server requests a sequence ID, all audit servers must be running on the
same application server.
Technical Manual
14-2
Audit management
After receiving the transaction ID, the audit server returns an acknowledgement
to the audit selector, including the transaction ID and information on where the
data is stored in the audit trail.
The audit selector waits until the audit server has logged all changes and
acknowledged the prepare commit. Then the audit server creates an audit
notification (database insert). The user transaction and the audit notification are
committed within the same transaction scope.
A transaction notification consists of:
The transaction ID.
User name.
Session name.
The commit time of the transaction.
A list of tables updated by the transaction.
For each table: an index to where the first log data of the first database action
on that table is stored. This is only relevant if the audit log is stored in files. If
the audit log is stored in the database, the transaction ID is the index.
Physically the audit notifications are stored in a relational database table.
Audit Notifications are always stored in the Tools Company. The Audit Selector
creates more than one audit notifications when the transactions involves updates
on more than 7 different tables/companies.
Technical Manual
14-3
Audit management
DB
tabledef
Table info
audit selections client bshell audit_spec
Audit client
Transaction How to
data log
Audit Transaction
data information
Transaction Trans action
notification ID Where to
log auditdef
DB Audit
driver server Sequence
generator
What to
log
Audit audit_set
data
Transaction
Row Sequence
notification
data number
The DB-client part of the bshell reads the tabledef file with audit selections. The
audit server reads the auditdef, audit_spec, and audit_set file.
The tabledef file specifies whether or not a table must be audited. The audit_spec
file specifies how the audit trail is organized and handles permission issues. The
audit_set file contains specifications about which columns to log.
The bshell sends the database actions or transaction data to the database driver. If
a database action meets the audit selection criteria, it is also sent to the audit
server. At commit time the audit server writes the audit-data to the audit trail and
returns the transaction information and a transaction ID to the audit client. To
create this transaction ID, the sequence generator creates a sequence number.
Then the transaction notification server writes a transaction notification within
the user transaction scope.
Technical Manual
14-4
Audit management
Storage of audit-data
For each table in each company number, the audit server uses a set of files to
store audit-data. You can read audit files using the 4GL functions or the
dictionary programs. This section describes the types of file that are used.
Sequence files
The audit-data is stored in a set of files called sequence files. There can be
multiple sequence files per table per company number.
Apart from storing audit-data and transaction information, a sequence file also
stores information about audited columns of the table, the audit-data dictionary.
The name of the sequence file is built using the table name and company
number. The format of the sequence file name, where the prefix a indicates an
audit file, just as t indicates a table itself, is as follows:
a<mmmnnn><company number>.<sequence file number>
mmm represents the module code
nnn represents the file number
For example, for table ttadv999 and company 000 the sequence files are:
aadv999000.000
aadv999000.001
aadv999000.002
aadv999000.003
..........
For detailed information on the sequence file, refer to the section “Format of
audit files.”
Information file
There is one information file per table per company number, which:
Stores information about all sequence files used for this table/company
number combination.
Contains controlling information used to create and maintain sequence files.
The name of the information file is based on the table name and the company
number. The format of the information file name is as follows, where mmm
represents the module code and nnn represents the file number:
a<mmmnnn><company number>.inf
For example, for table ttadv999 and company 0, the information file is
aadv999000.inf.
Technical Manual
14-5
Audit management
NOTE There is one set of files per table name/company number combination. This
means that any associated information, sequence file, or operation is identified
by the table name/company number combination. For the sake of readability this
document uses the word “table” to refer to a table name/company number
combination.
Technical Manual
14-6
Audit management
Technical Manual
14-7
Audit management
Audit management
The audit management version 6.2 incorporates the following features in
BaanERP audit management utility:
Audit-data is stored in a set of files, instead of in a single file. Multiple files
allow for better management than a single large file.
Each transaction is identified by a transaction header, which logs useful
information about the transaction, such as the corresponding user and time.
Also, the data is organized per transaction. Each transaction has a header
followed by all audit-data, which enables easy tracking of the changes that
users have made.
When the audit-data is being written, information of audited columns in
tables is also stored in audit files. If the table data dictionary is later changed,
you can still interpret old audit-data by using the stored column information.
Table level commands affecting table data such as create table, clear table,
and drop table, are also logged by the audit server.
Audit management such as printing audit files and display audit sequences is
done by using the sessions belonging to the Audit Management business
object.
The transaction notification server sends a message to the audit file indicating
when a transaction has successfully been completed.
Technical Manual
14-8
Audit management
Name
Stores column name without table name prefix.
Type
Single byte indicating field type. The defines in BDB layer for field type are
used, because 4GL also uses the same values. For example, for the CHAR field,
the BDB type is BDB_CHAR, and the 4GL counterpart DB.CHAR has the same
define as BDB_CHAR.
Depth
Single byte, indicating depth of the field.
Size
2 bytes, indicating field size. For array fields this is the total size of all fields in
array.
Technical Manual
14-9
Audit management
Application data
In accordance with the application user requirement, the audit server reserves an
extra four bytes in each audit row, which application programs can use. This
4-byte space is called application data. The audit server does not interpret the
application data in any way.
Table operations
For table operations such as create table, drop table, and clear table, the audit
server stores only a one-byte indicator. If a non-empty table is dropped or
cleared, a delete row operation is created for all rows in the table!
Row operations
For row operations, the audit server keeps the values of audited fields. In
addition to field values, the audit server also stores a one-character code
indicating the type of row operation.
Insert actions
The new values of all audited fields to be inserted are stored in the audit file.
Delete actions
The field values of the record to be deleted are stored in the audit file.
Update actions
You can set up a configuration to store only the primary key columns and those
values that have been changed, or include columns of a record that have not been
changed. You use the file audit_set to specify the tables that have additional
columns logged.
Technical Manual
14-10
Audit management
The following table shows the levels of detail you can specify:
Level Description Example
1 Table name with company and column tccom110:812:colm
2 Table name for all companies and column tccom110:*:colm
3 Table name with company tccom110:812
4 Table name for all companies tccom110:*
5 Module name with company tccom:812
6 Module name for all companies tccom:*
7 Package name with company tc:812
8 Package name for all companies tc:*
9 All-package with company *:812
10 All-package for all companies *:*
Length
A two-byte field that indicates the length of this audit row (excluding this field
itself).
Appl Data
A four-byte field reserved for application program usage. The audit server, when
writing a row, initializes this to nulls.
Action
A one-byte character code indicating the action done on the table. The following
codes are available:
-C create table
-R drop table
-L clear table
-I insert row
-D delete row
-U update row
Data
The previous fields fulfill the audit requirement for table-level actions. No Data
field is included for table-level actions.
Technical Manual
14-11
Audit management
For row level actions, the important values of audited fields are stored as data, as
explained in the following sections.
Insert/Delete actions
Values of all audited fields are stored for insert and delete actions. They are
stored in the same field order as that of the audit-data dictionary of a sequence
header. If the audit-data dictionary of a table has columns in the order c4, c2, c1,
c3, c6, the values are stored in the same order.
Update actions
For update actions, the field number precedes the field values in the audit row.
Field numbers used here are related to the sequence of fields in the audit-data
dictionary and not to the original table data dictionary. Suppose a table has
columns c1, c2, c3, c4, c5, c6, with primary key (c4, c2), and all except c5 are
audited. The audit-data dictionary contains information for these columns in
order c4, c2, c1, c3, c6. Thus the field number 0 refers to field c4 and not to field
c1. Similarly, field 3 refers to c1 and not to c3. For update actions, an audit row
looks as follows:
Length Appl Data U Multiple Field Entries
Field Number
A two-byte entry that indicates the field in the audit-data dictionary.
Changed
A single-byte flag, used to indicate whether the field is updated or not. The field
value for primary key fields must be stored, whether they are changed or not.
When the field value is changed, the corresponding flag is set to Y, otherwise it
is set to N. The values for all other audited fields are stored in the audit row only
if they are changed, so for these fields, the flag is always set to Y.
Old Value
The old value of the field that is being updated. For a primary key column that is
not changed, this is the only value stored.
New Value
If an audited field value is changed, this represents the new value. For primary
key audited fields that are not changed, this field is not present in the audit row.
Technical Manual
14-12
Audit management
The primary key field or any other audited fields are changed. In this case the
field entry is as follows:
Field number Y Old Value New Value
Here c4, c2, and so on, indicate the values of the corresponding fields. Each field
entry size is the size of the field itself.
Technical Manual
14-13
Audit management
Delete Row
Length Appl Data ‘D’ c4 c2 c1 c3 c6
Update Row
Assume that c2 (primary key column) and c6 are changed.
Length Appl 'U' 0 N c4.o 1 Y c2.o c2.n 4 Y c6.o c6.n
Here, the entry for field 0 (c4) is present, although it is not changed, because the
field is a primary key field. Its only value stored is c4.o, the old value. Because
c2 (field 1) and c6 (field 4) are changed, their old and new values are stored as .o
and .n respectively.
Audit server
Long transactions and overflow file
The audit server buffers audit-data in its memory buffers until the end of the
transaction. For example, if during a transaction, 100 rows are inserted in a table
and then a commit is done, all the audit rows for the insert are buffered by the
audit server. This data is written to the audit files only at the time of commit.
The audit server uses individual memory buffers for each table. The size of the
buffers is set to enable them to hold large amounts of data. However, the memory
buffers might not be able to contain the results of a very large transaction. In this
case, the audit server uses an overflow file to buffer the remaining data.
The overflow file is created in $BSE/tmp. There is one overflow file per session
per server. Its name is made using the session ID and process ID (pid) of the
audit server, as follows:
ao.{Session Id>.<Process Id of the Audit Server>
Technical Manual
14-14
Audit management
A single overflow file is used to buffer data for all the tables in the session for
which the memory buffers were insufficient. At the end of the transaction, if any
table has data in the overflow file. The overflow file is read and put in the
corresponding sequence file. After all data has been read and copied from the
overflow file, the overflow file is deleted.
If a transaction is canceled, the overflow file is deleted.
NOTE The memory buffers of the audit server can hold a large amount of data. If the
audit server still has to use the overflow file, the transaction is too big. This can
be a flaw in application design or coding. If possible, such transactions must be
avoided.
Sequence termination
The audit server uses a set of sequence files to store audit-data for a table. The
audit server switches from one sequence file to the next under the following
circumstances.
Technical Manual
14-15
Audit management
If the audit-data dictionary changes after the system writes some audit-data to a
sequence file, you cannot continue using the same sequence. In this case, the
audit server stops using the current sequence and marks it closed while the audit-
data dictionary has been changed. It starts using the next sequence.
Note that here the switch is made only if the audit-data dictionary changes. This
is different from changing the table data dictionary. Changing the table-data
dictionary does not mean that the audit-data dictionary is also changed.
Events that lead to changes in the audit-data dictionary are in the following
example.
Suppose you have a table with columns c1, c2, c3, c4, c5, c6 with primary key
(c4, c2) in which all except c5 are audited. The audit-data dictionary contains
information for these columns in order c4, c2, c1, c3, c6.
Consider the following changes:
Number of audited columns changed
If the audit trail status for any field is changed, the audit-data dictionary changes.
For example, if audit trail is enabled for c5, the audit-data dictionary must have
column information in the order c4, c2, c1, c3, c5, c6. This is different from the
audit-data dictionary of the current sequence, so a sequence change occurs.
Similarly, if auditing is disabled for c1, the new audit-data dictionary is c4, c2, c3
and c6, which is different from the current audit-data dictionary. As a result, a
sequence change occurs.
Order of audited primary key columns changed
Initially the primary key was (c4, c2). If its definition is changed to (c2, c4), the
new audit-data dictionary is c2, c4, c1, c3, c6. Because this is different from the
audit-data dictionary of the current sequence, the audit server closes the current
sequence and uses the next sequence.
Order of other audited columns changed
The audit-data dictionary changes if the order changes in which the columns
(other than the primary key columns) occur in the table definition. For example,
if the table is now defined as c1, c2, c4, c5, c6, c3, the new audit-data dictionary
is c4, c2, c1, c6, c3. In this case the sequence order is changed.
Technical Manual
14-16
Audit management
Technical Manual
14-17
Audit management
To lock a file
When writing the data for a transaction, the audit server can close the current
sequence and start using the next sequence. Thus it can change the current
sequence field in the information file header. It also changes the sequence status
and sequence end time for the current sequence, and changes the status and start
date/time of the next sequence.
Even if the audit server does not switch sequences, it needs to change the current
offset in the information header and the number of transactions in the sequence
header. This means that it always changes the information header and the
sequence header. Moreover, because the sequence header is maintained in the
sequence file and information file, both of these must be changed.
At the start of a transaction termination command for each table and before
writing buffered data to the audit file, the audit server locks the information file
header and sequence header in the information file and in the sequence file. The
audit server puts write locks on, so that no other read or write lock can succeed.
After the data for all tables is written, the locks on all tables are released. If there
is an error on any table, the status of transactions for tables already written is
changed to abort and the locks on all tables are released.
Technical Manual
14-18
Audit management
The audit server uses a data structure, called a handler, to keep track of the file
descriptors for the information and sequence files on each table. When these files
are opened, the file descriptors are stored in the handler. The handlers of all
tables are kept in a linked list in an LRU manner. For example, when files are
first opened, the handler is allocated and is put in most recently used (MRU)
position. As other tables are opened, this handler moves toward the LRU
position. Later on, if this table is involved in another transaction, the same
handler is reused and is again moved to the MRU position. Also, when a file is
open, all data is written to the file before the data goes to the next table. Thus,
until all data is written for a table in the current transaction, the handler for that
table is guaranteed to stay in the MRU position and in no way can it reach the
LRU position.
If the audit server reaches the open file limit when opening a new information
file, sequence file, or overflow file, it picks up the LRU handler in the handler
list and closes its information file and sequence file. The assumption is that
because the table has not recently been used, it is the best choice as a victim for
closing files.
Multisession support
The audit server supports multiple sessions, which means that the same audit
server is used for multiple sessions within the client.
The audit-data dictionary of a table is kept globally. The same table/company
number in multiple sessions shares a single audit-data dictionary.
Technical Manual
14-19
Audit management
The handlers (one used per table/company number combination) are kept in
global lists. If multiple sessions operate on the same table/company number
combination, they share a single handler.
Technical Manual
14-20
Audit management
The information sent by the audit server to the bshell contains the following data:
Tablename T1
Company number C1
Sequence number of audit file S1
Offset of transaction X1 in sequence file
Tablename T2
Company number C2
Sequence number of audit file S2
Offset of transaction X2 in sequence file
The following table shows an example:
After the application has finished updating the database, the data is committed.
The bshell requests a transaction ID from the audit server. The audit server
generates a sequence number and sends it back to the bshell together with the
transaction information message. The bshell uses this information to create a
transaction notification, and sends a commit to the database.
Technical Manual
14-21
Audit management
Process Description
This is the physical process that the transaction notification server follows:
1 Read all audit notification rows for the first database transaction.
2 Parse the information from the first audit notification row and store it in one
or more transaction notifications.
3 Repeat the previous step until all information in all audit notification rows of
this transaction has been parsed.
4 Remove all audit notification rows of this transaction.
5 Restart at step 1 for the next database transaction.
Technical Manual
14-22
Audit management
Idle
Start
Stop Interrupt
Start Start
Stopped Interrupted
Technical Manual
14-23
Audit management
The states and state transitions of the transaction notification server process are
descrbed in the following table.
All state transitions except Interrupt are triggered by the TNS User Interface.
You can start or stop the TNS process (based on the current state of the process)
and clear the TNS Settings table.
Audit errors
The audit server uses the following error messages. If you receive one of these
error messages, refer to $BSE/log/log.audit for more information regarding the
cause of the error.
E_AUD_SETUP 251 The audit setup is not correct.
This can occur if the specification in the $BSE/lib/audit_spec file is not in proper
format.
TOSEQ 6 SECURITY 28 MAXSEQSIZE 25K or
No table/company number combination.
aa:00a:TOSEQ 6 SECURITY 28 MAXSEQSIZE 25K
Incorrect company number.
*:*:TOSEQ 6 SECURITY 28 MAXSEQSIZE 5K
The maximum sequence size limit is less than the specified limits. Refer to the
section “Format of audit files” for details about the format of this file. It can also
mean that the current sequence file was illegally removed or that the sequence
files were removed without using the 4GL interface. Audit files used during the
first run can also cause this error.
Technical Manual
14-24
Audit management
Authorizations
The Administrator user grants audit security permissions to users using the Audit
Authorizations (ttaad4562m000) session. These permissions determine whether
the user can use the sessions in the Audit Management business object.
Security permissions assigned to users are checked against previously existing
records to see if they conflict.
You can assign security permissions for all packages, modules, table numbers,
and companies. You can give some permissions for all packages, and disable
these permissions by giving no permissions to a range of packages.
You can use the Specified command to give particular permissions to a specified
package. By using Specified, the highest priority is given to the security
permissions assigned for that particular package, module, table and company.
You cannot assign security permissions for a range within a range. Suppose you
assign some permissions using the All command, then disable permissions for a
range between tt—vv. You cannot then enable permissions within this range or
an overlapping range. However, you can use the Specified command to enable
the permissions for a specific package.
The conflicting records are not stored in the table.
The security permissions for users are stored in a table ttaad462, which you can
access accessed using the sessions within the Audit Management business object.
Technical Manual
14-25
Audit management
The security checking is done at two layers, one at the user level and another for
reading audit information. The user can have permissions at the user level but not
for reading the audit information. At audit level, the security permissions are
stored in the audit information header of the audit information file.
None No permissions
All Print, clean, and maintain permissions
Print Only print permissions
Print/Clean Print and clean permissions
Print/Clean/Maintain Same as All
Technical Manual
14-26
Audit management
The user cannot print or clean up any audit information. To print, clean, or
maintain the audit information from the audit files, the permissions must exist at
both levels.
Permission at user level Print or print/clean
Permission at audit level Application-defined
The user cannot print or clean up any audit information in the audit files using
the sessions in the Audit Management business object. It is possible, however, to
run the Audit Information File (ttaad4160s000) session, because the user has
maintain permission only at audit file level.
Permission at user level Maintain or print/maintain or
clean/maintain
Permission at audit level Maintain/application-defined
If the user is not the Administrator and only application-defined exists at the
audit file level, no session of the Audit Management business object can be
executed. The administrator user can use the maintain session even if no
permissions are assigned to the administrator user. However, the administrator
user cannot use print and clean sessions unless security permissions are assigned
to the administrator.
If user bsp has print permission at user level, a further check is made to see the
security permissions at audit level. User bsp is only allowed to continue if print
permission is available at the audit level. Otherwise the session is canceled and
an appropriate message is displayed.
auditdef6.2
This file is used to specify the directories in which audit files are created. There
is one such file for each BSE environment, and it is located in $BSE/lib.
This file has the following structure:
<Table Name>:<Company Number>:<Directory Name>
Technical Manual
14-27
Audit management
audit_spec file
The audit_spec file is used to specify audit file parameters. There is one such file
for each BSE environment, and it is located in the $BSE/lib directory.
The format of the file is
Table Name:Company Number:Audit Specifications
Following is the meaning of each field.
Table Name
Indicates the table. The table name can have the following formats:
*
All tables in all packages.
Package
All tables in this package, for example tf, td, and so on.
Package and module code
All tables in the module, for example, tccom, ttadv.
Technical Manual
14-28
Audit management
Technical Manual
14-29
Audit management
Technical Manual
14-30
Audit management
audit_set
When the audit server starts, it reads the audit_set file and stores it in a fast-
access structure like a hash list.
Then at run time, when the audit server writes an updated record to the audit
trail, the audit server searches the fast-access structure for an entry that matches
the table on which the update was done. The audit server searches first the table
level, then the module level, then the package level, and finally the all-package
level until it finds a matching entry.
The audit_set file is used to specify columns of tables which always will be
logged with every update row.
Several levels of detail can be given: specifications for all packages, all modules
in a package, all tables in a module. Specifications can be made for one company
or all companies. Also column names of a table can be specified, in this case not
all but only those columns specified will be logged in addition with the changed
columns. Each entry must specify Y for extra columns being logged or N for no
extra columns.
This results in the following levels of detail:
Level Description Example
1 Table name with company and column tccom110:812:Y:colm
2 Table name for all companies and column tccom110:*:Y:colm
3 Table name with company tccom110:812:Y
4 Table name for all companies tccom110:*:Y
5 Module name with company tccom:812:Y
6 Module name for all companies tccom:*:Y
7 Package name with company tc:812:Y
8 Package name for all companies tc:*:Y
9 All-package with company *:812:Y
10 All-package for all companies *:*:Y
Level 1 and 2 are column levels. The levels 3 through 10 are table levels.
Technical Manual
14-31
Audit management
Information file
There is one information file per table per company number. You can read the
information file by using the 4GL functions or the dictionary programs.
The information file contains the controlling information for the sequence files,
called the information header, followed by the sequence headers of all the
sequence files created.
The format of the information file name, where mmm means module code and
nnn means table number, is as follows:
a mmmnnn company number.inf
For example, the name for table ttadv999, company 0, is aadv999000.inf.
The structure of the information file is a header called information header,
followed by multiple sequence headers, one for each sequence created.
Technical Manual
14-32
Audit management
Information header
Technical Manual
14-33
Audit management
Sequence header
Each sequence file begins with a sequence header. The information file contains
copies of sequence headers for all sequences created.
Field Length Description
(bytes)
Sequence Number 2 Int This specifies the sequence number of the
sequence file.
Creation Date 8 Str This specifies the creation date, in UTC, of
the sequence file. Format: YYYYMMDD.
Creation Time 6 Str This specifies the creation time, in UTC, of
the sequence file. Format: HHMMSS.
Termination Date 8 Str This specifies the termination date, in UTC, of
the sequence file. Format: YYYYMMDD.
Termination Time 6 Str This specifies the termination time, in UTC, of
the sequence file. Format: HHMMSS.
Status 2 Int The status gives information to the user
whether the sequence file was user-
terminated or was closed because of DD
change or because a transaction data was
not possible to accommodate in the
sequence file.
Possible values are:
0001 : Terminated because of size.
0002 : Table DD changed.
0004 : User forced.
0010 : Sequence and info header mismatch.
0020 : To be set only in info header. Set
when the sequence is removed.
0040 : Change in sequence file version.
0100 : Version number present in sequence.
Number of 2 Int This specifies the data of the number of
Transaction in the transactions present in the sequence file.
Sequence
Application Info – 1 4 These bytes are reserved for storing data
specific to the application. If the application
needs to store any information in the audit
files, these fields must be used to store that
information.
Technical Manual
14-34
Audit management
Application Info – 2 4
Application Info – 3 4
Application Info – 4 4
Number of Fields 2 Int Total number of fields being audited.
Being Audited
Number of Fields in 1 Int Field information for all fields being audited is
Primary Index written below. First, the fields that are part of
the primary index are written, in the same
sequence as they are in the primary index.
Next, all remaining fields are written in the
order in which they occure in table DD. For
example, if fields f1, f2, f3, f4 are being
audited and the primary index is on f4, f2,
then field information will be written first for
f4, next for f2. Then it will be written for all
remaining fields. Number of Fields in Primary
Index will indicate how many fields are in
primary key. For example, for the above
example, the following field value should be
2 and the field layout will be f4, f2, f1, f3.
<Field Data 1>
…
<Field Data n> n = number of fields being audited
Sequence Version 4 Str Change note: In BAAN IVc and earlier
releases the sequence version is not
available. In that case these four bytes are
reserved space.
Reserved Space 4 This is reserved space. Applications should
not use this space and this may be used by
future releases of audit servers.
Length of Following 2 Int The length of the next sequence header in
Sequence Header the info file.
Field data
Technical Manual
14-35
Audit management
Sequence file
Multiple sequence files are used to store audit-data for each table/company
number combination. You can read the sequence files by using the 4GL
functions or the dictionary programs. The format of the sequence file name,
where mmm refers to the module code and nnn means table number, is as
follows:
a mmmnnn company number.sequence file number
For example, these sequence files can exist for table ttadv999, company number
0:
aadv999000.000
aadv999000.001
aadv999000.002
aadv999000.003
....
The sequence file contains the table name and company number, followed by the
sequence header. This is followed by transaction data of multiple transactions.
Transaction data is followed by a transaction header and contains multiple audit
rows generated for the transaction.
Technical Manual
14-36
Audit management
Technical Manual
14-37
Audit management
Technical Manual
14-38
Audit management
Technical Manual
14-39
Audit management
Transaction status
Length: 1 byte. Transaction status can have the following values:
− COMMIT_DONE
− ABORT_DONE
Number of audit rows in the transaction
Length: 2 bytes
Total bytes of data of this transaction
Length: 4 bytes
Technical Manual
14-40
Audit management
Four bytes of space is kept in every audit row to store application data. This data
is stored and manipulated by 4GL applications and not by the audit server. The
audit server keeps the 4 bytes of extra space to be used later. The type of
operation is a single character field, indicating the database action done on the
table.
The following characters are used to indicate audited database actions.
C – Create table.
L – Clear table.
R – Drop (remove) table
I – Insert row.
U – Update row.
In the audit row, the row data is present only for row level actions. The field
values, when stored, are stored in the same format as their data type. This means
that a value for a long field is stored as a long data type in the audit row. The
length of each field entry in the audit row is the same as the length of the column.
The row data for an insert consists of the field values to be inserted of all audited
fields, in the order in which they occur in the audit-data dictionary.
The row data for a delete consists of the field values of the row to be deleted and
of all audited fields, in the order in which they occur in the audit-data dictionary.
Not all fields in the table are updated for an update. Apart from storing field
values, an identifier is required to specify the field to which this data belongs.
Field numbers are used to identify the fields. The field number is its position in
the audit-data dictionary, starting with field 0.
An entry for a field contains the following information:
Field number – 2 bytes.
Is the value changed – 1 byte (Y or N).
Old Value.
New Value.
If a field is changed here, both old and new values are stored. If an audited
primary key field is not changed, only the old value is stored. If other audited
fields are not changed, nothing is stored. For all changes made to all audited
fields, entries are made to the audit-data.
Technical Manual
14-41
Audit management
Technical Manual
14-42
15 OLE Automation
General
OLE Automation is an industry standard that applications use to expose their
OLE objects to development tools, macro languages, and other applications that
support OLE Automation. For example, a spreadsheet application can expose a
worksheet, chart, cell, or range of cells—all as different types of objects. A word
processor can expose objects such as application, document, paragraph, sentence,
or selection.
When an application supports OLE Automation, the objects it exposes can be
accessed by Visual Basic. You can use Visual Basic to manipulate these objects
by invoking methods on the object or by getting or setting the object’s properties.
For example, if you create an OLE Automation object named MyObj, you can
write the following code to manipulate the object:
Dim MyObj As Object 'declaration
Sub PrintWordDoc()
Set MyObj = CreateObject("Word.Basic") 'start MS Word
MyObj.FileNewDefault 'open a new file
MyObj.Bold 1
MyObj.Insert "Hello, world." 'insert new text
MyObj.FilePrint 'print current file
MyObj.FileSaveAs "C:\WORDPROCDOCS\TESTOBJ.DOC"
MyObj.AppClose 'close MS Word
Set MyObj = Nothing
Exit Sub
End Sub
This example runs Microsoft Word to create and print a document with the text,
“Hello, world.”
The application that exposes objects is called an OLE Automation server, the
application using those objects is called an OLE Automation client.
Technical Manual
15-1
OLE Automation
This starts BaanERP with the BW user interface invisibly, in other words only
the Option Dialog icon is displayed. OLE Automation objects, such as BaanObj,
can have methods and properties. A method is a function that can be started to
perform a certain action. A property is an attribute that has a value. Property
values can be set or retrieved.
The BaanERP application object has the following methods:
dllname, functioncall ParseExecFunction.
Quit.
The BaanERP application object has the following properties:
Technical Manual
15-2
OLE Automation
These methods and properties allow Visual Basic programmers to call any
function in any DLL. For example:
BaanObj.Timeout = 10 ' 10 seconds timeout
BaanObj.ParseExecFunction "mydll", "myfunction(arg1, arg2)"
If BaanObj.Error <> 0 Then MsgBox("An error occurred")
MsgBox("The return value is " + BaanObj.ReturnValue)
This calls the myfunction function in the DLL named mydll. Note how
arguments are passed to myfunction. If arguments are passed by reference they
can be changed by the function call. Therefore the ReturnCall property contains
the modified arguments after the call.
The Timeout property is used to prevent blocking on erroneous calls. The Error
property contains the return status of the ParseExecFunction call, and the
ReturnValue property is the actual return value of the DLL function. If the DLL
function returns a long value, it is converted to a string in ReturnValue.
To return binary data in ReturnCall arguments, the binary property must be set to
True. ReturnCall can contain null characters.
Possible values for the Error property are:
0 success.
-1 unknown DLL name.
-2 unknown function name.
-3 syntax error in function call.
-10 timer expired.
-11 fatal error in function.
To end an automation session you can quit a BaanERP application as in this
example:
Set BaanObj = Nothing
Technical Manual
15-3
OLE Automation
Restrictions
When you use the OLE Automation interface, you must consider the following
restrictions:
Due to the 3GL parse_and_exec_function function, you cannot supply
arrays as arguments to a DLL function.
DLL functions with a variable number of arguments or optional arguments
are not supported.
When a string is passed by reference, the result cannot become longer than
the input string. When a string must be filled make sure it is initialized with
the same number of spaces as the maximum length that can be returned. The
maximum length is defined in the domain of the variable.
The maximum size of the FunctionCall string is 4KB (bshell limit).
The maximum size of the ReturnValue string is 4KB (bshell limit).
Two client applications cannot simultaneously use the same BW to make
DLL function calls.
Technical Manual
15-4
OLE Automation
switch.to.company(0)
sql_query = "select ttaad200.user from ttaad200"
sql_id = sql.parse(sql_query)
sql.exec(sql_id)
e = sql.fetch(sql_id)
if e = 0 then
user = ttaad200.user
else
user = ""
endif
return(user)
}
function extern string get_next_user()
{
string user(512)
e = sql.fetch(sql_id)
if e = 0 then
user = ttaad200.user
else
user = ""
endif
return(user)
}
Technical Manual
15-5
OLE Automation
Sub GetBaanERPUsers()
On Error GoTo CannotConnectToBaanERP
Row = 1
Column = 1
While (user <> "")
' fill the spreadsheet
Worksheets("Main Sheet").Cells(Row, Column)
= user
Row = Row + 1
If Row > 15 Then
Row = 1
Column = Column + 2
End If
' get next user
BaanObject.ParseExecFunction "demodll"
"get_next_user()"
If (BaanObject.Error <> 0) Then GoTo
BaanAutomationError
Technical Manual
15-6
OLE Automation
user = BaanObject.ReturnValue
Wend
BaanAutomationError:
MsgBox "A BaanERP automation error occurred"
Set BaanObject = Nothing
Exit Sub
End Sub
DLL information
The DLL ottdllsql_query contains:
Functions to parse, execute, and stop a query:
− olesql_parse
− olesql_fetch
− olesql_break
− olesql_close
Functions to import query results into Visual Basic:
− olesql_getstring
− olesql_getint
− etc
Technical Manual
15-7
OLE Automation
Technical Manual
15-8