Provides a default value for an expression that can be $Null.
Syntax
$value(expression1,expression2)
Parameters
expression1 | any expression |
expression2 | any expression |
Return Value
Same as the selected expression.
Comments
If expression1 is not $Null, $value returns the value of expression1; otherwise, it returns the value of expression2.
Example
detail line "Employee Number: " $value(EmpNum,"N/A")
Traps $Null values in a report and replaces them with “N/A”.
See Also
About Functional Expressions
CASE
Expressions and the $Null Property
IS [NOT] [$]NULL
File system path where one of the Zim executables started.
Return Value
A character string. Cannot be reset by an application program.
Example
C:\MyDirSubDir> zxclient -n mybase
After invoking ZXCLIENT, in the prompt:
> OUTPUT $startpath
C:\MyDirSubDir
See Also
$ClipPath
$DBPath
$ImagePath
$WorkPath
$ZimPath
$UserPath
Exits from a WHILE loop.
Syntax
BREAK
Comments
Upon encountering a BREAK command, the software continues execution at the first command following the ENDWHILE of the “innermost WHILE loop” containing the BREAK.
Any IF or CASE statements that are still open when a BREAK command is executed are automatically closed.
Example
Consider the following code fragment:
while var1 > 20
.. some commands …
if var2 = 1
break
else
… more commands …
endif
… still more commands …
endwhile
… commands after the WHILE loop …
When var2 is set to 1, the only commands executed in the above sequence are “some commands” and “commands after the WHILE loop”. Commands between the BREAK and ENDWHILE commands are ignored, and the “open” IF statement is automatically closed.
See Also
CONTINUE
GOTO
WHILE
Determines the day name associated with a specified date value.
Syntax
$dayname(date)
Parameters
date | a data, or an expression that evaluates to a date, in the form YYYYMMDD |
Return Value
Character string.
Comments
This function extracts day information from standard date values. Date is often the system variable $Date.
The values returned by the $dayname function can be altered with the Language Customizer utility.
Example
$dayname (19991225)
Evaluates to “Saturday”.
$dayname ($date+7)
Evaluates to “Saturday” when $Date is 19991225.
See Also
$Date
$day
$month
$monthname
$weekday
$year
Tests if a character string contains only letters and digits.
Syntax
$isalphanumeric(string)
Parameters
string | a 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 alphanumeric.
Example
$isalphanumeric("abc1")
Evaluates to $True.
$isalphanumeric("abc ")
Evaluates to $False.
See Also
$isalphabetic
$isdate
$isdigit
$isdigit
$isnumber
$isupper
$iszimname
$trim
Character Literals
Functional Expressions
Left-justifies a character string.
Syntax
$leftjustify(string)
Parameters
string | a character string or an expression that evaluates to a character string |
Return Value
Character string.
Comments
String is left-justified in a space that is $length(string) characters long. Leading spaces in string are ignored.
Example
$leftjustify(" abcde")
Evaluates to “abcde “.
$leftjustify(var1)
Evaluates to “3 ” if var1 is a LONGINT variable whose value is 3 (occupies 12 character spaces when converted to a string).
See Also
$center
$rightjustify
About Character Literals
About Functional Expressions
Conversion Between Data Types
Clears the screen and establishes the application window (BACKSCREEN) as the current window.
Syntax
SCREEN CLEAR
Comments
The SCREEN CLEAR command clears the contents of the application window (BACKSCREEN), hides any other windows that are currently displayed, makes the application window the current window, and places the cursor at the top, left-hand corner of the application window.
Although hidden, all other windows remain open and active. To re-display the hidden windows, use either the SCREEN RESET or WINDOW DISPLAY BACKSCREEN HIDE command.
Example
window clear backscreen
window set current backscreen
window display backscreen
The SCREEN CLEAR command is equivalent to the preceding sequence of commands.
screen clear % clear prev. data & expose application window
output “Output to printer? (y/n)” ;
input Response
if Response = “y”
set output printer
endif
screen reset
See Also
CLEAR
WINDOW CLEAR
Releases a connection to Zim Integrated Server on to an SQL database.
Syntax
DISCONNECT FROM [ “ZIMSERV” | “JDBCSAM” | alias name ]
Parameters
The alias name is one of the defined ones in the zimalias.zim configuration file.
Comments
The DISCONNECT command should only be issued after a CONNECT command has been successfully executed in order to disconnect a previous connected session. The name of the server to be used in DISCONNECT must be the same used in CONNECT.
Example
> connect to ”JDBCSAM” using (“Sales”, “MySQL”, “TheUser”, “ThePassword”,”5455″, “123.123.123.123”)
> disconnect from ”JDBCSAM”
> connect to ”ZIMSERV” using (“Inventory”, “”, “JOE”, “PASSWORD”, “Joes_Server”, “LinuxAirport”)
> disconnect from ”ZIMSERV”
See Also
COMPILE
CONNECT
SET COMPILEMODE
SET EXECUTEMODE
SET SQLCOMPILE
SET SQLTRACE
UNCOMPILE
Checks a value to see if it is $Null.
Syntax
expression IS [NOT] $NULL
Parameters
expression | Any expression. |
Return Value
Logical.
Comments
An IS $NULL comparison is logically true if expression is valueless (unassigned). If expression has been assigned any value (including the null string), then the comparison is logically false.
An IS NOT $NULL comparison is logically true if expression has been assigned any value (including the null string). If expression is valueless (unassigned), then the comparison is logically false.
$NULL can also be written as NULL.
Example
To find all employees whose records have no value recorded in the Age field, and then change that value to 39, enter
change all Employees where Age is $Null let Age = 39
See Also
About Boolean Expressions
About Conditional Expressions
Branches from an exception handler to the command immediately following the command that caused the exception.
Syntax
GOTO NEXT
Comments
GOTO NEXT is used only in an exception handler and only to branch to the command immediately following the one that caused the exception to occur. GOTO NEXT exits the exception handler, and closes it in the same way as ENDON.
Example
procedure DoReports()
on break
output “*** Report Terminated by User ***”
goto next
endon
report from clients (unrelated) placed orders
(report commands)
endreport
report from products (unrelated) require orders
(report commands)
endreport
report from orders (unrelated) issued invoices
(report commands)
endreport
endprocedure
If a break condition occurs during the generation of a report, a message is output and execution resumes at the command following the one that was interrupted.
See Also
GOTO
GOTO PREVIOUS
ON