SERVPROF

Document containing Zim statements to be executed by the Zim Database Agent when it starts its execution.

Syntax

SERVPROF

Comments

The SERVPROF command, if it exists, is executed when the Database Agent process starts. This command can be used to do initialization.

If the database has Zim directories containing tables that are being accessed by clients, you must include ACCESS commands for those directories. If the server is accessing tables through other Server Access Modules, you must connect to those servers (using the CONNECT command) in SERVPROF or by executing a SERVEREXEC command from the client.

$subscript

The current instance of the current form

Syntax

$subscript n

Parameters

nAny numeric value between 1 and 8

Comments

In combination of $FormNum, $subscript, $ FieldNum can uniquely identify a particular for field in a Zim display.

Example

form set (reverse) ($ formnum,$ fieldnum,$subscript)

Sets the current instance of a repeated form to reverse video.

find Products where ProdCode = fProducts.ProdCode [$subscript]

Finds all product records that match the product code on the current instance of the repeated form fProducts.

$MD5

Returns a cryptographic 128-bit hash value.

Syntax

$md5(expression)

Parameters

expressionan expression that evaluates to a string

Return Value

The value returned by $MD5 is a hexadecimal 32-characters long string representing the cryptographic hash value of the expression used as the argument.

Example

out $md5(1)
45954632C04A953592D33FDC5F59A64C
out $md5("1")
C4CA4238A0B923820DCC509A6F75849B

The returned values are different because the $md5(1) first converts the number 1 to a character string (which becomes ”       1″) and then applies the MD5 algorithm to it.

SET TIMEOUT

Syntax

SET TIMEOUT time

The SET TIMEOUT sets a timeout amount for the FILEPATH options PORT and CONNECTOR in the command SET INPUT.

Comments

By default, the time is set to zero.

For historical reasons, the value of time must be specified in tenths of a second, that is, for 5.5 seconds, it should say 55.

When opening a document for input with SET INPUT with above options, any subsequent statements referring the specified document will terminate if not satisfied within the time interval specified by time.

Example

set timeout 55
set input stdin filepath "connector://localhost:2333"
list 10 stdin

If the LIST statement is not satisfied within 5.5 seconds, the LIST is terminated.

SET CHECKPOINT

Enables or disables the checkpoint activity over changed buffers.

Syntax

SET CHECKPOINT ON|OFF

Comments

The CHECKPOINT option is set ON by default.

When CHECKPOINT is ON, all data changed in transactions successfully committed by users is sent to a checkpoint file which then is later committed to the database. In this way, the server can guarantee modifications and rollback transactions if some are aborted. It also allows the backup of databases in real time.

When CHECKPOINT is OFF, all data changed in transactions is sent immediately to the database. There is no guarantee of the data being written in case a transaction is aborted. Only one user can perform this kind of operation and the database remains in exclusive access for this user. This options simulates a single-user behaviour and is mainly designed to load big amounts of data as when a fresh database is being created or imported from another version of Zim.

$ClientOS

Indicates the operating system under which ZXCLIENT is currently running.

Syntax

$ClientOS

Return Value

A number according to the following table. It cannot be reset by an application program.

ValueOperating System
1Microsoft Windows
4Linux in General
5Android
6iOS
7OS X

$DBPath

$DBPath

File system path to the directory in which the application database is stored.

Syntax

$dbpath

Return Value

A character string. Cannot be reset by an application program.

Description

The $DBPath function is set to the value of the DBPath entry in the registry, or the value of the [ZIM] environment variable. If neither of the preceding values is set, the variable is set to the null string (which is interpreted as the current disk directory).

To indicate the current DBPath directory in a file name, start the name with a double quotation mark (“) character.

$ImagePath

Path to the disk directory containing image files for use in forms.

Syntax

$imagepath

Return Value

A character string. Cannot be reset by an application program.

Description

$ImagePath is set to the value of the ImagePath entry in the registry. If no value is provided in the file, the variable is set to the null string (which is interpreted as the current disk directory).

For image objects (fields) in forms, $ImagePath indicates the disk directory in which the image files can be found.

To indicate the current ImagePath directory in a file name, start the name with a caret (^) character.

en_CAEnglish