Skip to main content

$ZVERSION (ObjectScript)

Contains a string describing the current version of InterSystems IRIS.

Synopsis

$ZVERSION 
$ZV

Description

$ZVERSION contains a string showing the version of the currently running instance of InterSystems IRIS® data platform.

The following example returns the $ZVERSION string:

   WRITE $ZVERSION

This returns a version string such as the following:

IRIS for Windows (x86-64) 2018.1 (Build 487U) Tue Dec 26 2017 22:47:10 EST

This string includes the type of InterSystems IRIS installation (product and platform, including CPU type), the version number (2018.1), the build number within that version (the “U” in the build number indicates Unicode), and the date and time that this version of InterSystems IRIS was created. “EST” is Eastern Standard Time (the time zone for the Eastern United States), “EDT” is Eastern Daylight Saving Time (see Daylight Saving Time for details).

The same information can be returned by invoking the GetVersion()Opens in a new tab class method, as follows:

   WRITE $SYSTEM.Version.GetVersion()

You can get the component parts of this version string by invoking other %SYSTEM.VersionOpens in a new tab methods, which you can list by invoking:

   DO $SYSTEM.Version.Help()

Version and build number information can be viewed by going to the InterSystems IRIS launcher and selecting About....

The $ZVERSION special variable cannot be modified using the SET command. Attempting to do so results in a <SYNTAX> error.

Examples

The following example extracts the create date from the version string to calculate how old the current version of InterSystems IRIS is, in days. Note that this example is specific to Windows platforms:

   SET createdate=$PIECE($ZVERSION," ",9,11)
   WRITE !,"Creation date: ",createdate
   WRITE !,"Current date:  ",$ZDATE($HOROLOG,6)
   SET nowcount=$PIECE($HOROLOG,",")
   SET thencount=$ZDATEH(createdate,6)
   WRITE !,"This version is ",(nowcount-thencount)," days old"

The following example performs the same operation by calling a class method:

   SET createdate=$SYSTEM.Version.GetBuildDate()
   WRITE !,"Creation date: ",$ZDATE(createdate,6)
   WRITE !,"Current date:  ",$ZDATE($HOROLOG,6)
   SET nowcount=$PIECE($HOROLOG,",")
   WRITE !,"This version is ",(nowcount-createdate)," days old"

See Also

FeedbackOpens in a new tab