InterSystems IRIS Data Platform 2019.2  /  ObjectScript Reference

ObjectScript Reference
Previous section          
InterSystems: The power behind what matters   

Contains a string describing the current version of InterSystems IRIS.
$ZVERSION contains a string showing the version of the currently running instance of the InterSystems IRIS Data Platform™.
The following example returns the $ZVERSION string:
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() class method, as follows:
   WRITE $SYSTEM.Version.GetVersion()
You can get the component parts of this version string by invoking other %SYSTEM.Version 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.
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

Previous section          
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-16 05:50:13