Refer to the description of WHILE.
Categoria: ZIM 4GL Language Reference
OTHERWISE
Refer to the description of CASE.
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
n | Any 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.
SET TRANSACTION DEFAULTTYPE
Syntax
SET TRANSACTION DEFAULTTYPE READ|NORMAL
Comments
This command is ignored by Zim 9.
$MD5
Returns a cryptographic 128-bit hash value.
Syntax
$md5(expression)
Parameters
expression | an 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 IMPLICITTRANS
Make Zim Server generate implicit transactions.
Syntax
SET IMPLICITTRANS OFF | ON
Comments
This command is ignored and has no effect on Zim Server. It is only accepted for backward compatibility.
SET TIMEOUT
Syntax
SET TIMEOUT [num]
This command is ignored by Zim 9. Its approximate equivalent is the Zim Server configuration option Pending Timeout.
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.
Value | Operating System |
---|---|
1 | Microsoft Windows |
4 | Linux in General |
5 | Android |
6 | iOS |
7 | OS X |