SET TEXTDELIMITER

Specifies the current text delimiter for comma-delimited format.

Syntax

SET TEXTDELIMITER character

Parameters

character

Any valid character, or a variable containing a valid character. Reserved characters (e.g., space, backslash, etc.) must be enclosed in quotation marks.

Comments

The TEXTDELIMITER option is set to the double quotation mark (“) by default.

The specified character is used as the delimiter, marking the boundaries of character-type fields in the comma-delimited format. The delimiter is used 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 COMMADELIMITED format.

If TEXTDELIMITER is set to the space character, the double quotation mark is used as the text delimiter for both input and output.

Example

set textdelimiter “/”

 

See Also

ADD

CHANGE

INPUT

LIST

OUTPUT

SET DELIMITER

SET INPUT FORMAT

SET OUTPUT FORMAT

SET SPECIALSCAN

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

$or

Performs a bit-wise OR of two values.

Syntax

$or(char1,char2)

Parameters

char1a character string, or an expression that evaluates to a character string
char2a character string, or an expression that evaluates to a character string

Return Value

Character string.

Comments

The $or function combines the bit patterns of two characters in the fashion of a Boolean OR and returns the resulting character.

If the char1 or char2 string contains more than one character, only the first character in the string (one byte) is processed. You can express char1 and char2 as hex codes (e.g., 6E).

Example

$or("E","F")

The bit pattern of hex 0E is 00001110 and of hex 0F is 00001111. The above expression returns the bit pattern 00001111 (hex 0F).

See Also

$and

$not

SET SEQUENCENUMBER

Controls the way Automatic Sequence Numbers operate.

Syntax

SET SEQUENCENUMBER {object | ALL} {number | variable | ON | OFF}.

where

object

The name of an Entity-Set Relationship with fields that contains an ASN defined

ALL

Refer to all Entity-Sets and Relationships with fields that contain ASNs defined

number

a positive number from 1 up to 15-digit number

variable

a variable containing a positive number from 1 up to a 15-digit number. If the contents of the variable is $null, the number is assumed to be 1.

Comments

The command sets an initial number, enables or disables automatic sequential numbers to the mentioned object or to ALL the objects that contain ASN.

Examples

SET SEQUENCENUMBER ALL 1

Resets all existing ASN to 1.

LET MyVar = 1000
SET SEQUENCENUMBER Customer MyVar

Initializes the ASN for Customer to the value of 1000.

SET SEQUENCENUMBER ALL OFF

Disables all ASN.

SET SEQUENCENUMBER Customer ON

Enables the ASN for the Customer object and $ZimSeqNum returns the current sequence number available for Customer

$ServerFunction

Executes server-side functions.

Syntax

$serverfunction (server specific syntax [«,parameters»])

Parameters

server specific syntax

A character string or an expression that evaluates to a character string containing a server-specific syntax for execution on the server side.

parameters

Zero or more expressions to satisfy the usage of the server-specific syntax.

Return Value

A value created by the server-specific syntax.

Comments

$ServerFunction executes the specific syntax (for a particular server) using the parameters.

The syntax is not parsed and checked, but rather passed through directly to the Server and, therefore, must be accepted and understood there.

Examples

$ServerFunction ("sysfun.left(?,3)",var1)

This will is accepted as is by Oracle.

$ServerFunction("sysfun.left(cast(? as VARCHAR(20),3)",var1)

This syntax is accepted by DB2.

See Also

Server Side Functions with Input Parameters

The Benefits of $ServerFunction

$and

Performs a bit-wise AND of two values.

Syntax

$and(char1,char2)

Parameters

char1a character string, or an expression that evaluates to a character string
char2a character string, or an expression that evaluates to a character string

Return Value

Character string.

Comments

The $and function combines the bit patterns of two characters in the fashion of a Boolean AND and returns the resulting character. If the char1 or char2 string contains more than one character, only the first character in the string (one byte) is processed. You can express char1 and char2 as hex codes (e.g., 6E).

Example

$ and("E","F")

The bit pattern of hex 0E is 00001110 and of hex 0F is 00001111. The above expression returns the bit pattern 00001110 (character hex 0E).

See Also

$not

$or

About Character Literals

About Functional Expressions

SET OUTPUT

Specifies the current output.

Syntax

SET OUTPUT docname [APPEND] [FILEPATH file://<file full path>]

Parameters

docnameThe name of the application document to which all output is to be sent. Can also be one of the two pre-defined application documents, terminal or printer.
APPENDSpecifies that new output to docname is to be appended to the output already existing in the application document (if any).
FILEPATH file://<file full path>Specifies that output will be written to the file declared in the file option.

Comments

The SET OUTPUT command specifies the application document that is to receive the output from all subsequent FORM REPORT, GENERATE, LIST, OUTPUT, PRINT, REPORT FROM, and SELECT commands. The setting remains in effect until changed by a subsequent SET OUTPUT command.

The software provides two pre-defined application documents, terminal and printer, that correspond to your terminal screen and default printer, respectively. OUTPUT is set to Terminal by default. If set to printer, the SET OUTPUT command has no impact on the format in which the report prints; use $setproperty to change print properties for a report.

Example

set output MyDoc append
set output printer
report from ...
... other commands ...
endreport
set output terminal

This example shows how to write a document anywhere in the system. The first SET OUTPUT sets the output to “c:\myDir\FirstFile.txt” while the second sets it to “c:\myDir\SecondFile.txt”.

set output MyDoc filepath "file://c:\\myDir\\FirstFile.txt"
list 20 zimprof
set output MyDoc filepath "file://c:\\myDir\\SecondFile.txt"
list all AnotherDoc
set output terminal

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

$addticks

Calculates a time value by adding ticks to (or subtracting ticks from) a specified time value.

Syntax

$addticks(time,number)

Parameters

timean 8-digit number, or an expression that evaluates to an 8-digit number, that expresses a valid time value in the format HHMMSSTT
numbera number, or an expression that evaluates to a number

Return Value

Number, representing a time value.

Comments

Use $addticks to perform arithmetic with time values. The $addticks function calculates a time value by adding a number representing ticks to a time value. If number is negative, the effect is to subtract the ticks from the time.

Example

If $Time has the value 22503075, then

$addticks($time,5)

evaluates to 22503080.

$addticks($time,25)

evaluates to 22503100.

$addticks($time,-5)

evaluates to 22503070.

$addticks($time,200)

evaluates to 22503275.

See Also

$addhours

$addminutes

$addseconds

$ticks

PAGE RIGHT

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

Syntax

PAGE RIGHT reportitem [:format:]

Parameters

reportitem

Any 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.

format

A 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 RIGHT “footing” is placed along the right-hand edge of each page in a column-oriented report. The column of text generated by this command ends in the right-most column of the page. 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 (using aggregate functions) can be displayed in the footing.

 

See Also

How to Use The Report Generator

Output Masks

Report Item Format Options

pt_BRPortuguese