SET MEMBERINTERVAL

Sets the interval between set-processing progress messages.

Syntax

SET MEMBERINTERVAL num

Parameters

numNum can be:
an integer constant (e.g., 15, 200)
a variable, form field, menu item, or parameter that evaluates to an integer.

Comments

The MEMBERINTERVAL option is set to 1 by default.

The MEMBERINTERVAL option determines how many records are to be processed between messages tracking the progress of set-processing commands. Set-processing progress messages are turned on or off with the SET MEMBERCOUNT command.

Example

> set membercount on
> set member interval 10
> find Employees
200 processed.
200 selected.
>

The number of records processed and selected are displayed in increments of ten until all records are processed.

See Also

$MemberCount

SET ERRORS

SET MEMBERCOUNT

SET STOP ERRORS

Halts the execution of an application program if an error occurs.

Syntax

SET STOP ERRORS ON|OFF

Comments

The STOP ERRORS option is OFF by default.

When STOP ERRORS is switched ON, execution is halted (by the HALT utility) when an error occurs. To resume execution after the HALT, press Enter at the HALT prompt (>>).

Compiled application programs are not affected by SET STOP ERRORS.

The ET STOP ERRORS command is not affected by the SET RESET and SET RESTORE commands.

Example

> set stop errors on
:
> list all test
procedure test (p_OwnerName)
report from Fields where OwnerName = p_OwnerName % Spelling error
… body of report …
endreport
endprocedure
> test
*** Error *** …
>>

The HALT command is executed when the execution of test results in an error. (The name of the EntitySet Fields is misspelled in the body of the procedure.)

See Also

$ErrCode

SET SELECTIVITY

SET SINGLESTEP

SET EXECUTEMODE

SET EXECUTEMODE

Controls the mode of software execution.

Syntax

SET EXECUTEMODE SQLMODE | ZIMMODE | SERVERMODE

Comments

The EXECUTEMODE option is set to SQLMODE by default.

The SQLMODE option executes SQL database code.

The SERVERMODE option executes integrated Zim server code.

The ZIMMODE option executes standard Zim code. In ZIMMODE, EntType, RelType, and so on are ignored. In this way, it can be used for testing without an effective connection.

When EXECUTEMODE is SQLMODE, Zim executes integrated server requests on the target Zim server if possible. Otherwise, it sends SQL requests to the server. When EXECUTEMODE is SQLMODE, Zim executes code against the target SQL database. By setting EXECUTEMODE to ZIMMODE, Zim executes the code as standard Zim code.

Example

To execute Zim Client-server code as standard Zim code, enter

> set executemode zimmode

See Also

COMPILE

SET COMPILEMODE

SET SQLCOMPILE

UNCOMPILE

$absolute

Returns the absolute value of a number.

Syntax

$absolute(number)

where

numbera number, or an expression that evaluates to a number

Return Value

Number, positive, with the same number of decimal places as number.

Comments

Use $absolute to ensure that a number is positive (for functions such as $sqrt, for example). $absolute returns the absolute (unsigned) value of a number. The absolute value is always treated as positive.

Example

Certain functions – for example, $sqrt – accept only positive arguments. You can use $absolute to ensure that all arguments to these functions are positive.

$sqrt($absolute(-0.98))

evaluates as if it were:

$sqrt(0.98)

See Also

About Functional Expressions

$tolower

Converts alphabetic characters to lower case.

Syntax

$tolower(source)

Parameters

sourceany value, or an expression that yields any value

Return Value

Character string.

Comments

Returns a character string in which all letters are lower case. If source is not of a character data type, it is converted to a character data type before the function is applied.

Example

$tolower("the QUICK BROWN fox is 30 years oLD")

Evaluates to “the quick brown fox is 30 years old”.

output "Do you want output to go to the printer? (y/n)"
input <1>
if $tolower("#<1>") = "y"   % makes user response case insensitive
set output printer
endif

Ensures that the user response is case-insensitive.

See Also

$toupper

About Character Literals

About Functional Expressions

SET CHECKSETS

Controls consistency checking of result sets.

Syntax

SET CHECKSETS ON|OFF

Comments

The CHECKSETS option is set ON by default.
When CHECKSETS is ON, the software checks certain aspects of the component structure of result sets for consistency. This consistency checking is performed when a command creates a result set (using the -> (Result set) subcommand), if the set has already been defined as a result set, either in a previous set-producing command, or as a NamedSet object in the Object Dictionary. Normally, you should always leave CHECKSETS set ON.
The SET CHECKSETS command is not affected by the SET RESET and SET RESTORE commands.

Example

find Employees -> Set1

find Departments -> Set1

With CHECKSETS set ON, the second command in the preceding sequence produces an error (the component structure of the set is not consistent from one command to the next).

set checksets off

find Employees -> Set1

find Departments -> Set1

By setting CHECKSETS OFF, the command sequence produces no error.

See Also

CREATE

SET SQLCOMPILE

SET SQLCOMPILE

Controls the compilation of generated SQL statements within the SQL database.

Syntax

SET SQLCOMPILE ON|OFF

Comments

The SQLCOMPILE option is OFF by default. The software stores SQL statements generated in the compiled code and executes them dynamically at run time.

When SQLCOMPILE is switched ON, the software attempts to compile all generated SQL statements at the SQL database server. Before attempting to compile with SQL compiling switched on, you must be connected to the SQL database.

Changes to this setting provide control over how the SQL statements are to be executed. The query optimizers for certain SQL databases perform differently when processing SQL statements dynamically.

Example

set sqlcompile off
list all Customers format CC LastName
set sqlcompile on

Forces the statement list all Customers format CC LastName to be executed dynamically at the server within a compiled application program.

See Also

COMPILE

SET COMPILEMODE

SET EXECUTEMODE

SET SQLTRACE

UNCOMPILE

EVALUATE

EVALUATE

Evaluates expressions while the main command processes a set of records.

Syntax

EVALUATE «expression»

Parameters

expressionAny valid expression, but usually an assignment using LET and an aggregate function. If expression is complex, it must be enclosed in parentheses.

Example

change all Employees where LastName = Smith
let Salary = 1.1 * Salary
evaluate (let ExtraCost = $ total(Salary * 0.1))

Determines how much extra money is needed after all employees named Smith are given a 10% pay raise.

let RegTot[1]=0 RegTot[2]=0 RegTot[3]=0
compute Sales
evaluate (let RegTot[RegNum] = RegTot[RegNum] + SalesAmt)

Calculates total sales by region assuming three regions were served by the same sales force.

See Also

ADD

CHANGE

COMPUTE

DELETE

FIND

LET

LIST

REPORT FROM

$monthname

Determines the month name associated with a specified date value.

Syntax

$monthname(date)

Parameters

datea data, or an expression that evaluates to a date, in the form YYYYMMDD

Return Value

Character string.

Comments

This function extracts month information from standard date values. Date is often the system variable $Date.

The values returned by the $monthname function can be changed with the Language Customizer utility, ZIMLANG.

Example

$monthname(19981225)

Evaluates to “December”.

$monthname($date+7)

Evaluates to “January” when $Date is 19981225.

See Also

$Date

$day

$dayname

$month

$weekday

$year

About Data Types

About Functional Expressions

$isdate

Tests if a character string is a valid date.

Syntax

$isdate(string)

Parameters

stringa character string or an expression that evaluates to a character string

Return Value

1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).

Comments

This function tests if a particular character string is a valid date.

Example

$isdate("19980606")

Evaluates to $True.

$isdate("19980229")

Evaluates to $False.

$isdate($date)

Evaluates to $True.

$isdate($date+30)

Evaluates to $True.

See Also

$isalphabetic

$isalphanumeric

$isdigit

$islower

$isnumber

$isupper

$iszimname

Character Literals

Functional Expressions

en_CAEnglish