INITIALIZE

Freshly initializes per user entity sets and relationships with data.

Syntax

INITIALIZE PERUSER objectname

Parameters

objectname

 

An entity set name or relationship name (with fields).

 

Comments

INITIALIZE PERUSER creates a new physical file corresponding to the objectname. It eliminates the need of deleting all data from the object or copying physical files. Also, it doesn’t affect the internal data dictionary nor requires recompilation of programs after executing it.

It can be executed anytime a fresh file is needed.

objectname must be a PerUser object defined in the data dictionary and no longer needs to be indicated in the file “areas.zim”.

Example

If MyCustomer is an entity set defined as per user in the Data Dictionary, then the following statements are valid:

>INITIALIZE PERUSER MyCustomer

>ADD 1000000 MyCustomer FROM …

>FIND MyCustomer

>1000000 selected.

>INITIALIZE PERUSER MyCustomer

>FIND MyCustomer

>0 selected.

$ObjErrHelpFile

Provides the name of the help file that the component provided when an exception was raised.

Syntax

$ObjErrHelpFile

Return Value

Character string (VARALPHA). Can be reset by an application program.

Comments

The variable provides the name of the help file that the component provided when an exception was raised because of an  improper operation. This variable is set to $null when a component operation triggers a Zim error but is set to a meaningful value when a Zim 5207 error is encountered.

Warning

COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.

$ZimPath

File system path to the directory in which the Zim software is installed.

Syntax

$zimpath

Return Value

A path name. Cannot be reset by an application program.

Description

$ZimPath is set to the value of the Zim entry in the registry. If this value is not set, the variable is set to the null string (which is interpreted as the current disk directory).

To indicate the current ZimPath directory in a file name, start the name with an octothorpe (#) character.

Note: For Zim on Windows users, if $ZimPath is pointing to a directory that contains old DLLs, you can get the following error message:

ZIM caused Segment Load Failure in Module zim.exe @0002:511C.

Ensure that $ZimPath is not pointing to old DLLs.

$ObjException

A variable set when an exception occurs.

Syntax

$ObjException

Return Value

Number (LONGINT) Can be reset by an application program.

Comments

This variable is set only when a Zim error 5207 is generated (when the component application wishes to raise an exception). When an exception is raised, this variable is set as well as $ObjErrCode, $ObjErrDescription, $ObjErrHelpFile, $ObjErrHelpTopic and $ObjErrObjectType.

Warning

COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.

$ObjErrHelpTopic

Provides a topic number for the help file provided by $ObjErrHelpFile.

Syntax

$ObjErrHelpTopic

Return Value

Number (LONGINT). Can be reset by an application program.

Comments

The variable provides a topic number for the help file provided by the $ObjErrHelpFile. This topic number does not apply to all help files formats. This variable is set to $null when a component operation triggers a Zim error but is set to a meaningful value when a Zim 5207 error is encountered.

Warning

COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.

RESET CONNECTOR DOCUMENT

Resets the connector document file name to its original file name.

Syntax

RESET CONNECTOR DOCUMENT «connector document»

Parameters

connector document

The name of a connector document.

Comments

The RESET CONNECTOR DOCUMENT resets the filename for the connector document back to the value found in the Zim directory. The reset value will be used on all subsequent opens.

Example

reset connector document SMS_SEND

$ZimOS

Indicates the operating system under which Zim:X is currently running.

Syntax

$zimos

Return Value

A number as stated below. It cannot be reset by an application program.

 

ValueOperating System
3All Linux Flavours
11Microsoft Windows
12Linux Running on Android

SET DATABASE ACCESS

Sets an exclusive or shared access to a database.

Syntax

SET DATABASE ACCESS EXCLUSIVE|SHARED

Comments

This command enables a specific user (usually the database administrator) to grant himself/herself exclusive access to a ZIM database. Under normal conditions, database access is shared among users; however, in some situations, the administrator may want exclusive access to the database (i.e. urgent program recompilation or database maintenance).  To obtain exclusive access the database administrator can issue the command with the option EXCLUSIVE.

At this point the ZIM Server stops accepting new incoming transactions, waits for the existing transactions to end and then grants exclusive Database access to the specific user.  Any subsequent requests from other users are kept in a suspended state. As soon as all transactions stop, all files are closed. Therefore, it is possible to issue operating system commands to deal with physical database files.

When the exclusive access is no longer required, the command can be issued with the option SHARED.

From this point, Zim Server activity is resumed and all suspended state users can continue with their normal processing.

At the end of the session that set the exclusive access and if the access was not reverted to shared, then Zim Server automatically sets the shared attribute to that database.

 

$ObjErrParameter

Provides the number of the parameter that caused an error.

Syntax

$ObjErrParameter

Return Value

Number (INT). Can be reset by an application program.

Comments

If a Zim error of 5201 (Unknown Parameter) or 5202 (Type Mismatch) occurs, the $ObjErrParameter is set to the number of the parameter that caused the error. If the 5201 error occurs and the $ObjErrParameter is $null, the method or property name is unknown. This variable is reset when an error is triggered that was caused by a component operation.

Warning

COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.

pt_BRPortuguese