SET SIZE

Sets the estimated number of records in an EntitySet, relationship, application document, or result set.

Syntax #1

SET SIZE object size

or

SET object SIZE size

Parameters

object

The name of an EntitySet, a relationship with fields, a structured application document, or a result set.

size

A positive number representing the estimated number of records in object.
A size of 0 instructs the software to use an internal default value for the size of object.

Comments

The SET SIZE command supplies the strategy analyzer with your estimate of the number of records in object. SET SIZE has no effect on the AvgSize field associated with object in the Object Dictionary.

The SET SIZE command is not affected by the SET RESET and SET RESTORE commands.

Example

To set the estimated number of records in the EntitySet Employees to 5000, use

set size Employees 5000

 

See Also

SET SELECTIVITY

SET COMPILEMODE

SET COMPILEMODE

Controls the behavior of the Compiler.

Syntax

SET COMPILEMODE SQLMODE | ZIMMODE | SERVERMODE

Comments

The COMPILEMODE option is set to SQLMODE by default. The compiler generates SQL database code—that is, code bound to a particular SQL database type.

In ZIMMODE, EntType, RelType, and so on, are ignored. The compiler generates standard Zim code.

In SERVERMODE the compiler generates Zim Server code when the objects are defined as “zimserv” (or an alias of it). SERVERMODE is the preferred setting since ZIM execution is most often more efficient. Also,  Zim Server requests if all entity sets and relationships in the command are for the same Zim server.

When COMPILEMODE is SQLMODE, Zim generates code that is bound to a particular SQL database type. By setting COMPILEMODE to ZIMMODE, Zim generates standard Zim code.

If a program has been compiled with SERVERMODE or SQLMODE on, the program is flagged as compiled for a server and can only be executed in SERVERMODE or SQLMODE. In ZIMMODE, these types are ignored and all entity sets and relationships are assumed to be part of the local Zim database. During compilation in ZIMMODE, no server requests are stored in the compiled code and the program is flagged as compiled for Zim. Executing such a program never results in server access.

Example

To compile a Zim Client-server application to run as a standard Zim application, enter

> set compilemode zimmode

See Also

COMPILE

SET EXECUTEMODE

SET SQLCOMPILE

UPDATE

SET DELIMITER

Specifies the current field delimiter.

Syntax

SET DELIMITER character

Parameters

characterAny valid character. The space, forward slash, comma, and quotation mark are the most commonly used.
If character is not a letter or a digit, it must be enclosed in quotation marks.
If character is a special character such as space or backslash, it must be enclosed in quotation marks.
If character is a string longer than one character in length, only the first character in the string is used as the delimiter.

Comments

The default field DELIMITER is the space character.

The specified character is used as a delimiter by the INPUT command (input from the terminal), by the ADD and CHANGE commands (input from an unstructured application document), and by the LIST and OUTPUT commands (output to the terminal or an unstructured application document) in either normal or comma-delimited format.

If the space is specified as the delimiter, then tab is also acknowledged as a delimiter, and multiple spaces are considered to constitute a single delimiter.

In comma-delimited format, the space causes the comma to be used as the delimiter for both input and output.

Example

set delimiter “/”

set delimiter ‘”‘

set delimiter “‘”

In the preceding examples, the slash, double quotation mark, and single quotation mark, respectively, are specified as the delimiter. (Only one delimiter character can take effect at one time.)

See Also

SET INPUT FORMAT

SET OUTPUT FORMAT

SET SPECIALSCAN

SET TEXTDELIMITER

BREAK (Loops)

Exits from a WHILE loop.

Syntax

BREAK

Comments

Upon encountering a BREAK command, the software continues execution at the first command following the ENDWHILE of the “innermost WHILE loop” containing the BREAK.

Any IF or CASE statements that are still open when a BREAK command is executed are automatically closed.

Example

Consider the following code fragment:

while var1 > 20

.. some commands …

if var2 = 1

break

else

 … more commands …

endif

 … still more commands …

endwhile

… commands after the WHILE loop …

When var2 is set to 1, the only commands executed in the above sequence are “some commands” and “commands after the WHILE loop”. Commands between the BREAK and ENDWHILE commands are ignored, and the “open” IF statement is automatically closed.

See Also

CONTINUE

GOTO

WHILE

SCREEN CLEAR

Clears the screen and establishes the application window (BACKSCREEN) as the current window.

Syntax

SCREEN CLEAR

Comments

The SCREEN CLEAR command clears the contents of the application window (BACKSCREEN), hides any other windows that are currently displayed, makes the application window the current window, and places the cursor at the top, left-hand corner of the application window.

Although hidden, all other windows remain open and active. To re-display the hidden windows, use either the SCREEN RESET or WINDOW DISPLAY BACKSCREEN HIDE command.

Example

window clear backscreen

window set current backscreen

window display backscreen

The SCREEN CLEAR command is equivalent to the preceding sequence of commands.

screen clear   % clear prev. data & expose application window

output “Output to printer? (y/n)” ;

input Response

if Response = “y”

 set output printer

endif

screen reset

See Also

CLEAR

WINDOW CLEAR

DISCONNECT

Releases a connection to Zim Integrated Server on to an SQL database.

Syntax

DISCONNECT FROM [ “ZIMSERV” | “JDBCSAM” | alias name ]

Parameters

The alias name is one of the defined ones in the zimalias.zim configuration file.

Comments

The DISCONNECT command should only be issued after a CONNECT command has been successfully executed in order to disconnect a previous connected session. The name of the server to be used in DISCONNECT must be the same used in CONNECT.

Example

> connect to ”JDBCSAM” using (“Sales”, “MySQL”, “TheUser”, “ThePassword”,”5455″, “123.123.123.123”)

> disconnect from ”JDBCSAM”

> connect to ”ZIMSERV” using (“Inventory”, “”, “JOE”, “PASSWORD”, “Joes_Server”, “LinuxAirport”)

> disconnect from ”ZIMSERV”

 

See Also

COMPILE

CONNECT

SET COMPILEMODE

SET EXECUTEMODE

SET SQLCOMPILE

SET SQLTRACE

UNCOMPILE

GOTO NEXT

Branches from an exception handler to the command immediately following the command that caused the exception.

Syntax

GOTO NEXT

Comments

GOTO NEXT is used only in an exception handler and only to branch to the command immediately following the one that caused the exception to occur. GOTO NEXT exits the exception handler, and closes it in the same way as ENDON.

Example

procedure DoReports()

 on break

  output “*** Report Terminated by User ***”

  goto next

 endon

 report from clients (unrelated) placed orders

  (report commands)

 endreport

 report from products (unrelated) require orders

  (report commands)

 endreport

 report from orders (unrelated) issued invoices

  (report commands)

 endreport

endprocedure

If a break condition occurs during the generation of a report, a message is output and execution resumes at the command following the one that was interrupted.

See Also

GOTO

GOTO PREVIOUS

ON

UP

Moves the current member pointer one or more records “up” in a result set.

Syntax

UP [num] [setname]

Parameters

numCan be:
an integer constant (15, 200);
a variable, form field, or parameter that evaluates to an integer;
the word ALL.
The default value of num is 1.
If num is negative, the command effectively becomes a DOWN or NEXT command.
setnameThe name of a result set. If setname is omitted, the current set is used.

Comments

PREVIOUS is a synonym for UP.

Example

up 10

Moves the current member pointer 10 members “up” towards the start of the set.

up 5 MySet

list 5 MySet

Moves the current member pointer five members “up”, then lists five members (starting with the new current member).

See Also

$currentmember

BOTTOM

DOWN

LOCATE

NEXT

PREVIOUS

TOP

DISPOSE

Releases memory occupied by user-defined variables (including form fields and menu items) or result sets.

Syntax

DISPOSE option

Parameters

optionCan be
«item»
The name of a variable, form field, menu item, form or menu whose current memory allocation is to be released.
ALL
Releases the current memory allocation of all user-defined variables, form fields, and menu items.
SET
Causes all result sets to be reset to empty.

Comments

DISPOSE releases the memory where the current values of variables (including form fields and menu items) are stored. As a result, the objects whose values were stored in that memory become $Null. DISPOSE does not close or erase the objects themselves.

Example

dispose all

Releases memory used to store current values of all variables, form fields, and menu items in an application.

dispose Form1 Menu1

Releases the memory used to store the current values of all form fields in the specified form and menu.

DECRYPT

Decrypts the data in an EntitySet or relationship with fields.

Syntax

DECRYPT object

Parameters

objectThe name of a previously encrypted entity set or a relationship with fields. A role name can be used.

Comments

Reverses an ENCRYPT command.

If the data in the specified EntitySet or relationship was not previously encrypted, the command raises an error.

The ENCRYPT and DECRYPT commands prevent users outside of an application session from reading sensitive data contained in disk files. Within Zim, encrypted data is automatically decrypted as the application programs work with it. All encryption and decryption in a particular database is based on a key established when you initiate a new database by executing the New Database (ZIMINIT) administrative utility.

Encrypted EntitySets and relationships are accessed in exactly the same way as unencrypted EntitySets or relationships. Internally, the software automatically decrypts data from an encrypted file as you work with that file. A slight performance penalty is paid for working with encrypted data.

See Also

ENCRYPT

Securing Data Inside an Application

en_CAEnglish