The current date.
Syntax
$date
Return Value
A number in date format (YYYYMMDD). Cannot be reset by an application program.
Description
The current date, as set in the operating system.
Example
From the zim prompt:
out $date
This extracts the DATE from the TIMESTAMP and then prints the proper $DayName.
OUT $DayName($GetUTCDate($TimeSecs))
See Also
$adddays
$addmonths
$addweeks
$addyears
$day
$dayname
$month
$monthname
$Time
$TimeSecs
$weekday
$year
About Data Types
System Variables
These system variables have been removed from the Zim syntax and are replaced by WINDOW STATUS.
Indicates if the application user has pressed the “break” key.
Syntax
$breakflag
Return Value
Binary. Can be reset by an application program.
Description
At the start of an application session, $BreakFlag is set to “0” ($False). Set to “1” ($True) if the application user presses the “break” key. The application program must reset the variable to “0” ($False) to be able to detect subsequent user interrupts.
See Also
About Conditional Expressions
SET BREAKABLE
System Variables
The number of records processed by the most recent set-processing command.
Syntax
$membercount
Return Value
A number. Can be reset by an application program.
Description
The number of records processed by the most recent set-processing command.
See Also
ADD
CHANGE
COMPUTE
DELETE
FIND
INSERT
LIST
REPORT FROM
SELECT
SORT
UPDATE
System Variables
The number of records found by the last FIND command.
Syntax
$setcount
Return Value
A number. Can be reset by an application program.
Description
The number of records in the result set produced by the most recent FIND command.
Example
find Students where GradePt = 4.00
Produces a set of Students whose GradePt is 4.00. If the set contains three students whose grade point average is 4.00, then $SetCount would be set to 3.
See Also
$lastmember
$MemberCount
System Variables
File system path to the application user’s work directory (specified in a Zim configuration file).
Return Value
A character string. Cannot be reset by an application program.
Description
The current work path as specified in the configuration file.
To indicate the current WorkPath directory in a file name, start the name with a close parenthesis ( ) ) character.
See Also
$ClipPath
$DBPath
$ImagePath
$ZimPath
The current time.
Syntax
$time
Return Value
A number. Cannot be reset by an application program.
Description
The current time (format: HHMMSSTT, 24-hour notation), as set in the operating system.
Some operating systems provide time only to the nearest second. In such cases, the TT (ticks) portion of the time is always set to 00.
See Also
$addhours
$addminutes
$addseconds
$addticks
$Date
$hours
$minutes
$seconds
$ticks
$TimeSecs
System Variables
The error code generated by the last command executed.
Syntax
$errcode
Return Value
A number (0 to 9999.) Can be reset by an application program.
Description
Indicator of success (0) or a reason (1 to 9999) for the failure of the most recently executed command.
Explanations for many error codes are contained in the ErrorHelp entity set, which you can access from your database application using the DESCERR or EXPLERR utility program.
See Also
$ErrLevel
$LastErrLevel
$LastErrMessage
$MaxErrLevel
System Variables
The error message generated by the last command that returned an error code.
Syntax
$lasterrmessage
Value
A character string. Can be reset by an application program.
Description
$Null at the beginning of each application session. The value changes only if an error occurs, or if the application program explicitly assigns a value.
When non-$Null, the variable represents, for the current session, the software message generated for the most recently executed command that returned an error code.
See Also
$ErrCode
$ErrLevel
$LastErrLevel
$MaxErrLevel
System Variables
The current user’s operating system user ID.
Syntax
$userid
Return Value
A number, or $Null. Can be reset by an application program.
Description
The current user’s operating system user ID; otherwise, $Null.
You can use the $UserID and $GroupID system variables to build levels of security into your applications.
During any Zim session, you can LOGIN under any defined UserName (in EntitySet Users). $ZUserID and $ZGroupID are then set to the UserID and GroupID associated with UserName; $UserID and $GroupID (containing values taken from the operating system) are still available for use.
See Also
$GroupID
$ZGroupID
$ZUserID