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

RENAME

Changes the name of certain objects.

Syntax

RENAME object oldname AS newname [IN directory]

Parameters

objectOne of
CONSTANT, DIRECTORY, DISPLAY, DOCUMENT, ENTITYSET, FORM, RELATIONSHIP, ROLE, SET, VARIABLE, WINDOW
oldnameThe current name of object.
newnameThe new name for object. The new name must not be the name of an existing object.
directoryThe 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

PAGE LEFT

Specifies the vertical heading for each page in a column-oriented report.

Syntax

PAGE LEFT reportitem [:format:]

Parameters

reportitemAny valid expression. Complex expressions must be enclosed in parentheses. When you specify more than one expression, each must be separated from the next by at least one space.
formatA set of instructions defining the format for the associated reportitem. Format is enclosed in : (colons) and can consist of any valid combination of format options.

Comments

The PAGE LEFT command generates a “heading” along the left-hand edge of each page in a column-oriented report. The column of text generated by this command starts in column 1 on the page. Report items in this command can include individual data values only from the first record to be processed on the current report page.

See Also

How to Use The Report Generator

Output Masks

Report Item Format Options

TRANSACTION

Starts an explicit transaction.

Syntax

TRANSACTION [READ]

Parameters

READThis option is ignored.

Comments

TRANSACTION marks the start of a sequence of commands that are to be handled as a single transaction. The transaction can be terminated either with an ENDTRANSACTION or  with a QUITTRANSACTION command.

TRANSACTION sets the system variable $InTransaction to $True.

Example

form set accelerator Return Escape

while

 form open fEmpForm

 form display input

 if Event.EventName <> “Escape”

  find Departments where Departments.Dno=fEmpForm.Dno

  if $setcount = 0

   form open fDeptForm

   form display input

  endif

  transaction

   if $setcount = 0

    add Departments from fDeptForm

   endif

   add Employees from fEmpForm

  endtransaction

 else

  return

 endif

endwhile

See Also

BEGIN WORK

ON

QUITTRANSACTION

SET TRANSACTION FLOW

GENERATE

Generates application code from a template.

Syntax

GENERATE zimprog [ (parm)|string ]

Parameters

zimprogThe name of an application document that contains an application program template.
parmAn expression whose value is to be passed to zimprog. Multiple parameters must be separated from one another by commas.
stringA string that is passed to zimprog if zimprog is a macro program.

Comments

The commands in zimprog are executed interactively. When an opening program template delimiter (<<) is encountered, execution is suspended, and the subsequent lines are written (after macro substitutions) to the current output. This process ends when a closing program template delimiter (>>) is encountered alone on a line.

See Also

$ (Template line join)

Program Templates and the GENERATE Command

GOTO PREVIOUS

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

Syntax

GOTO PREVIOUS

Comments

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

Example

Note: In this example, all transactions are assumed to be implicit transactions (i.e., single commands).

procedure UpdateDB()

 on deadlock

  output “The database is busy.”

   output “Do you want to try again? ( y/ n):” ;

   input Response

  if Response = ” y”

goto previous

  else

   return

  endif

 endon

 … the rest of the commands in the procedure …

endprocedure

If a deadlock condition occurs, the exception handler asks the application user if the transaction should be attempted again. If the answer is yes, the GOTO PREVIOUS command causes the application program to retry the command that caused the deadlock condition. If the answer is no, the procedure terminates.

See Also

GOTO

GOTO NEXT

ON

PAGE FOOTING

Specifies the page footing for a report.

Syntax

PAGE FOOTING reportitem [:format:]

Parameters

reportitemAny valid expression. Complex expressions must be enclosed in parentheses. When you specify more than one expression, each must be separated from the next by at least one space.
formatA set of instructions defining the format for the associated reportitem. Format is enclosed in : (colons) and can consist of any valid combination of format options.

Comments

the PAGE FOOTING command causes a footing to be displayed at the bottom of every page of a report. Report items in this command can include individual data values only from the last record processed on the current report page; however, summary information computed over all the members on the current report page can be displayed in the footing.

See Also

BREAK (Reports)

How to Use The Report Generator

PAGE HEADING

REPORT FOOTING

Report Item Format Options

SORT

Sorts the members of an existing result set.

Syntax

SORT [setname>] BY expression [ASCENDING|DESCENDING]

Parameters

setname

The name of a result set. If setname is not specified, the current set is used.

expression

An expression that identifies a field to be used as a sort key. Complex expressions must be enclosed in parentheses.

ASCENDING or DESCENDING

Specifies how the sort on the associated key is to be performed.
ASCENDING (default)
Sorts in “alphabetical order” (A-Z, 0-9).
DESCENDING
Sorts in “reverse alphabetical order” (Z-A, 9-0).

Example

find all Employees where Name = Smith -> SmithNames

sort SmithNames by Salary

The preceding two commands could be combined into one by using a SORTED BY subcommand.

sort SmithNames by FirstName DeptNum Salary descending

The preceding command sorts the employees named Smith by first name (ascending order), department (ascending order), and salary (descending order).

 

See Also

SORTED BY

pt_BRPortuguese