TRANSFORM

Transfers control to another procedure.

Syntax

TRANSFORM procedurename [(]expression[)]

Parameters

procedurenameThe name of the procedure to which execution control is to be transferred.
expressionParameters or macros for procedurename (formatted as when calling the procedure).

Comments

TRANSFORM transfers execution control to the specified procedure, but does not return control to the calling procedure once procedurename has finished executing. Control returns instead to the “parent” of the calling procedure.

Example

Consider the following sequence of procedures:

01 procedure Proc1 ( )

02  Proc2 ( )       (Control goes to line 12)

:   … more commands …

10 endprocedure

11 %————————

12 procedure Proc2 ( )

13   transform Proc3 ( )   (Control goes to line 23)

:   … more commands …

21 endprocedure

22 %———————–

23 procedure Proc3 ( )

24  … more commands …

25 endprocedure      (Control goes to line 03)

The normal flow (without TRANSFORM) is Proc1 to Proc2 to Proc3 to Proc2 to Proc1.

The flow for calling with TRANSFORM is Proc1 to Proc2 to Proc3 to Proc1.

See Also

How To Call Procedures

RETURN

STOP

PAGE HEADING

Specifies the page heading for a report.

Syntax

PAGE HEADING [BREAK HEADING indicator] reportitem [:format:]

Parameters

indicatorIndicator can be
OFF
Suppresses all break headings at the top of each new report page.
LEVEL n
Causes the break heading for break level n and below to be displayed at the top of each report page. N is a positive integer.
The default value is LEVEL 1 (i.e., all break headings are displayed at the top of each report page).
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 HEADING command causes a heading to be displayed at the top of every page of a report. It also controls the display of break headings at the top of each report 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

BREAK (Reports)

How to Use The Report Generator

PAGE FOOTING

REPORT HEADING

Report Item Format Options

PASSWORD

Changes or assigns a password to the current Zim user ID.

Syntax

PASSWORD newpassword [oldpassword]

Parameters

newpasswordThe new password, up to 18 characters. Any characters are valid (i.e., letters, digits, punctuation). $Null is also valid; its effect is to remove a password.
Can also be an expression. If necessary, the expression is converted to character format. Complex expressions must be enclosed in parentheses.
If the value given for newpassword is longer than 18 characters, only the first 18 characters are used.
oldpasswordThe current password. When there is no current password, omit oldpassword, or use $Null.
Can also be an expression. If necessary, the expression is converted to character format. Complex expressions must be enclosed in parentheses.
If the value given for oldpassword is longer than 18 characters, only the first 18 characters are used.

Comments

The new password takes effect immediately. To remove a password, use a value for newpassword that is $Null.

Password checking is case-sensitive. They must be changed during a read/write transaction because passwords are stored in encrypted form. An attempt to change a password during a read-only transaction fails.

Example

Transaction (Explicit Read Write transaction)

password “$moreprofits” “$profits”

Changes the current user’s password from $profits to $moreprofits.

See Also

Data Types

Case Sensitivity

LOGIN

WHERE (Condition)

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

DELETE FROM

Deletes records from EntitySets or relationships with fields.

Syntax

DELETE [ALL] FROM SQLsetspec [EVALUATE clause] [-> clause]

Parameters

ALLOptional. Whether or not you include the ALL argument, all records in SQLsetspec are deleted.
SQLsetspecAn SQL set specification. If omitted, records are deleted from the current set (if it exists).

Comments

DELETE FROM is the SQL version of the DELETE command.
Records cannot be deleted from a composite set. Data cannot be deleted from application documents or forms.
DELETE FROM acts by default on all records in SQLsetspec. By contrast, DELETE acts by default on only the first record in a set.

Warning: You cannot recover data deleted by the DELETE FROM command. If no backup copy of the data exists, the data is permanently lost.

Example

delete from Employees where LastName = “Smith”

Deletes every employee whose last name is Smith.

delete from Fields where Length > (select avg (length) from Fields)

Deletes every field whose length is greater than the average length of all fields.

See Also

$MemberCount

DELETE

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

KEEP

KEEP

Keeps (retains) some components in a result set while discarding others.

Syntax

KEEP «component»

Parameters

component

The name of a component found among the objects declared in a set specification. Any number of components can be specified, provided they appear among the declared objects.

Comments

In certain instances, you want to select records from several objects based on their relationships, but to keep data from only some of those objects. The KEEP subcommand enables you to specify the components whose data is to be kept in the result set.

The specified components of the set specification are kept. Components not kept are discarded, and duplicate records are removed from the set being specified.

Example

find all Employees WorkIn Department
  where LastName = “Jones” keep Departments

The department information is kept; all other components are discarded. If the KEEP subcommand were omitted, department information would be repeated for any department where more than one employee named Jones works.

 

See Also

ADD

CHANGE

COMPUTE

DELETE

FIND

INSERT

LIST

REPORT FROM

SELECT

UPDATE

-> (Result Set)

Assigns a name to the set of records processed by the main command.

Syntax

-> setname

The set of records processed by the main command is given the name setname.

where

setnameThe name to be assigned to the result set.

Comments

You can explicitly create a result set by adding the characters -> and an appropriate name to the end of any set processing command.

The result setname can be:

  1. the name of a set object in the database. The set specification used in the main command must be consistent with the structure defined for the set object in the Object Dictionary.
  2.  the name of a result set previously created by a set-producing command such as FIND or DELETE. The set specification used in the main command must be consistent with the structure of the previously named result set unless a SET CHECKSETS OFF command has been issued.
  3. a new name

Example

find Employees where LastName = "Jones" -> JSet

The result set JSet contains all records from Employees in which the last name is Jones.

UNION

UNION

Combines the members of two or more result sets into a single set.

Syntax

set1 UNION set2

Parameters

set1The name of a result set that resulted from the execution of a set-producing command.
Set1 and set2 must have the same component structure.
set2The name of a result set that resulted from the execution of a set-producing command.
Set1 and set2 must have the same component structure.

Comments

When used within a FIND command, the set that results from the application of UNION contains all of the records from the specified sets, with duplicates being eliminated.
The sets must have the same component structure.

Example

find Employees (unrelated) WorkFor Managers keep Employees

find current (Employees -> Managers) -> MgrSet

% top level managers

find Employees WorkFor MgrSet keep Employees -> EmpSet

while

find Employees WorkFor EmpSet (Employees -> Managers) -> EmpMgrSet

if $setcount = 0

break

endif

find EmpMgrSet keep Managers -> NewMgrSet

find MgrSet union NewMgrSet -> MgrSet

endwhile

While the preceding program demonstrates the use of UNION, the program can be replaced with the single command shown below.

find Employees WorkFor Managers keep Managers -> MgrSet

See Also

INTERSECT

MINUS

COMPLETE

COMPLETE

Used as a part of a set specification to select both matching and non-matching members of an EntitySet, a relationship with fields, a form, a menu, a result set, or a structured application document.

Syntax

object (COMPLETE)

Parameters

object

The name of an EntitySet, a relationship with fields, a structured application document, a form, a menu, or a result set. Where applicable, may be a role name.

Comments

COMPLETE, when used in a set specification, selects all records in the associated object regardless of whether they satisfy a modifying relationship. This function is related to the theoretical partial outer join operation.

Note: When using the WHERE clause with COMPLETE, if the conditions specified by the WHERE clause are not met, then no data is returned, even though the COMPLETE option has been specified.

Example

list Employees (complete) WorkIn Departments

Lists all employees regardless of whether they work in a particular department. If some employees lack corresponding Departments values, then the Departments fields in the list of composite records are $Null.

find all Managers (complete) Manage Employees

Lists all managers regardless of whether they currently have a staff.

 

See Also

ADD

CHANGE

COMPUTE

DELETE

FIND

LIST

REPORT FROM

SELECT

UNRELATED

UPDATE

USING

pt_BRPortuguese