WHERE
States a condition.
Syntax
WHERE expression
Parameters
expression | A logic expression using conditional and Boolean operators. |
Comments
WHERE states the conditions that restrict processing in the main command to only certain members of the set specification, contingent on a value within each of the (related) records being considered.
Of all the available (related) records in the record-containing objects, only those records for which the condition is logically true become members of the set.
Example
list all Employees where LastName = Smith and FirstName = J?
The preceding command lists only those employees whose last name is Smith and whose first name starts with the letter J.
See Also
About Boolean Expressions
About Conditional Expressions
ADD
CHANGE
COMPUTE
DELETE
DELETE FROM
INSERT
LIST
REPORT FROM
SELECT
UPDATE
Defines the title of the row element
Syntax
set xml rowelement constant
Parameters
constant | A character string or an expression that evaluates to a character string |
Comments
SET XML ROWELEMENT defines the identification of the row element for each row data that is printed whenever the set output format xml or xmlsimple is set. By default, ZIM prints the pair …
.
Example
set save
set output format xmlsimple
set xml rowelement /p>
set output MyDoc
list 1 Docs
set restore
See Also
SET OUTPUT FORMAT
SET XMLHEADER
Controls lexical tracing.
Syntax
SET [LOCAL] LEXTRACE ON|OFF
Parameters
LOCAL | Indicates that lexical tracing is to be switched ON or OFF only at the “local” level. |
Comments
The LEXTRACE option is set OFF by default.
When LEXTRACE is ON, each line of a procedure is displayed on the terminal, one character at a time, as it is parsed. Each line is preceded by the procedure name and document line number. If an error occurs, the resulting error message appears immediately following the character that caused the error.
Comment lines are traced. Carriage returns are inserted into the output when continuation characters (backslashes) are encountered. Statements are shown after macro substitution (if any) is complete.
Each output line starts with the procedure name and the application document line number as shown in the following example:
pCustReport[19] report from Customers
The SET LEXTRACE command has no effect on compiled procedures.
The SET LEXTRACE command is not affected by the SET RESET and SET RESTORE commands.
See Also
SET COMMANDTIMING
SET TRACE
SET TRACEOUTPUT
Releases memory occupied by user-defined variables (including form fields and menu items) or result sets.
Syntax
DISPOSE option
Parameters
option | Can 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.
Calculates the cosine of a number.
Syntax
$cos(number)
Parameters
number | a number, or an expression that evaluates to a number |
Return Value
Number, with the same number of decimal places as number.
Comments
The value returned by this function has the same number of decimal places as number. Ensure that you specify enough decimal places in your equation to ensure a sufficiently granular result. Unusual results such as
-0 are an indication that the number of decimal places needs to be increased. For example, if you enter
$cos(2)
without any decimal points, you receive the result
-0
However, if you enter
$cos(2.0000)
you receive the result
-0.4161
Example
$cos(0)
Evaluates to 1.
let var1 = 3.14
let var2 = $cos(0.50*var1)
Var2 evaluates to 0.00.
See Also
$acos
$cosh
$sin
$tan
About Functional Expressions
Calculates the arctangent (in radians) of the quotient of two numbers.
Syntax
$atan2(number1,number2)
Parameters
number1 | a number, or an expression that evaluates to a number |
number2 | a number, or an expression that evaluates to a number |
Return Value
Number, with the same number of decimal places as number1.
Comments
Number1 is divided by number2 before the arctangent is calculated.
The value returned by $atan2 has the same number of decimal places as number1.
Example
$atan2(1.000,2)
The above command is equivalent to $atan(0.500) and returns the value 0.464.
See Also
$acos
$asin
$atan
$tan
$tanh
About Functional Expressions
Decrypts the data in an EntitySet or relationship with fields.
Syntax
DECRYPT object
Parameters
object | The 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
Builds a single character string out of separate character strings.
Syntax
$concat(string[«,string»])
Parameters
string | A character string or an expression that evaluates to a character string. Each string must be separated from the next by a comma (,). |
Return Value
Character string.
Comments
The function builds a single character string out of separate strings.
Example
$concat($ttrim(FirstName)," ",LastName)
Can evaluate to “John Smith “. Combines three strings.
$concat($ttrim(LastName),", ",$ttrim(FirstName)," ",Initials)
Can evaluate to “Smith, John T.”. Combines five strings.
let Today = $concat($trim($dayname($date)),", ",
$day($date),", ",$monthname($date))
Can evaluate to “Monday, 30, October”. Combines five strings.
See Also
$delete
$insert
$left
$position
$replace
$right
$squeeze
$substring
$translate
Changes the name of certain objects.
Syntax
RENAME object oldname AS newname [IN directory]
Parameters
object | One of CONSTANT, DIRECTORY, DISPLAY, DOCUMENT, ENTITYSET, FORM, RELATIONSHIP, ROLE, SET, VARIABLE, WINDOW |
oldname | The current name of object. |
newname | The new name for object. The new name must not be the name of an existing object. |
directory | The name of the application directory in which object is located. |
Example
rename entityset Deppartments as Departments
The preceding command renames an EntitySet that was accidentally given a misspelled name.
See Also
CREATE
ERASE
How To Name Objects
Calculates one number modulo another.
Syntax
$modulus(expr1,expr2)
Parameters
expr1 | a number, or an expression that evaluates to a number |
expr2 | a number, or an expression that evaluates to a number |
Return Value
Number, with no decimal places.
Comments
Expr1 modulo expr2 is the remainder of the division of expr1 by expr2.
Before the operation is carried out, expr1 and expr2 are rounded, if necessary, to yield integer values.
Example
$modulus(5,2)
Evaluates to 1.
$modulus(5.2,2.43)
Evaluates to 1.
$modulus(Age,10)
Evaluates to 4 if Age is 54.
See Also
About Functional Expressions