The System built-in functions are a collection of methods and attributes designed to aid the programmer in obtaining information about Livelink itself, and the environment in which Liveink is running. This information ranges from the version number of the operating system, to thread identifiers, to the file extensions used for shared libraries. Almost none of these methods have the ability to change the environment in any way - they exist simply to return setup, configuration, and environment data.


Class Attributes Index

 o DOS
The String "DOS".
 o English
The Integer constant for the English language.
 o Japanese
The Integer constant for the Japanese language.
 o Korean
The Integer constant for the Korean language.
 o Mac
The String "Mac".
 o Motif
The String "Motif".
 o NotEncoded
The Integer constant for the character encoding of Not Encoded.
 o Unix
The String "Unix".
 o UTF8
The Integer constant for the character encoding of UTF-8.
 o Windows
The String "Windows".

Class Methods Index

 o AppBuildNo()
Gets the Livelink application build number as a String.
 o AppPatchLevel()
DeprecatedGets the Livelink application patch level as a String.
 o AppVersion()
Gets the Livelink version as a String.
 o AppVersionList()
Gets the Livelink version as a List.
 o BaselineRefCounts()
Resets the baseline values for object reference counts output by System.RefCounts()
 o CharEncoding( [Integer arg1] )
Returns or sets the system character encoding.
 o CurrentLocaleSuffix()
Returns the thread current Locale suffix.
 o DefaultLocaleSuffix()
Returns the system default Locale suffix.
 o EOL()
Returns the OS specific line terminator string.
 o FilePrefsPath( [String arg1] )
Returns or sets the default path of the configuration file.
 o GetLocaleDateFormats()
Returns an Assoc containing the date/time formats for all locales.
 o IntlLanguage( [Integer arg1] )
Returns or sets the system default language.
 o IntlStrings( [Boolean arg1] )
Returns or sets if the system will use advanced string handling routines compatible with most languages.
 o LanguageCode()
Determines the language used for the system.
 o LibSuffix()
Returns the file extension (including dot) of a shared library in the environment on which Livelink is running.
 o Mac()
Indicates whether Livelink is running in a Macintosh environment.
 o Motif()
Not used.
 o MultiByte( [Boolean arg1] )
Returns or sets if the system processes strings using multibyte character compatible routines.
 o Name()
Determines the name of the operating system on which Livelink is running.
 o ProfileOff()
Not used.
 o ProfileOn()
Not used.
 o RefCounts()
Outputs the number of refcounted OScript objects of most types and the difference in number of refounted objects since the last time System.BaselineRefCounts() was called
 o SetCurrentLocaleSuffix( [String arg1] )
Sets the thread current Locale suffix.
 o Sleep( [Integer arg1] )
Puts the current thread to sleep for arg1 milliseconds
 o ThreadID()
Returns a unique Integer indicating the current thread identification.
 o ThreadIndex()
Returns a unique Integer indicating the current thread index.
 o Unix()
True if Livelink is running on a Unix operating system.
 o Version()
Determines the version number of the operating system.
 o Win32()
True if Livelink is running in a 32-bit Windows environment.
 o Windows()
True if Livelink is running in a Windows environment.

Class Attributes

 o DOS
 String DOS

The String "DOS".

 o English
 Integer English

The Integer constant that represents the English language.

 o Japanese
 Integer Japanese

The Integer constant that represents the Japanese language.

 o Korean
 Integer Korean

The Integer constant that represents the Korean language.

 o Mac
 String Mac

The String "Mac".

 o Motif
 String Motif

The String "Motif"

 o NotEncoded
 Integer NotEncoded

The Integer constant for a character encoding of Not Encoded.

 o Unix
 String Unix

The String "Unix"

 o UTF8
 Integer UTF8

The Integer constant for a character encoding of UTF-8.

 o Windows
 String Windows

The String "Windows"

Class Methods

 o AppBuildNo
 String AppBuildNo()

Gets the Livelink application build number as a String.

Returns:
A String representing the build number.
 o AppPatchLevel
 String AppPatchLevel()

Deprecated Gets the Livelink application patch level as a String.

Returns:
A String representing the patch level.
 o AppVersion
 String AppVersion()

Gets the Livelink version as a String. The major, minor, and incremental release number will appear separated by dots. For example: "8.0.1" would indicate Livelink Version 8.0.1.

Returns:
A String representing the major, minor, and incremental release numbers of Livelink.
 o AppVersionList
 List AppVersionList()

Gets the Livelink version as a List. The major, minor, and incremental release numbers will each appear as elements in the list. For example: {'8','0','1'} would indicate Livelink Version 8.0.1. Development builds will contain a character element 'd' followed by the development build number.

Returns:
A List containing the major, minor, and incremental release number of Livelink.
 o BaselineRefCounts
 Boolean BaselineRefCounts()

Resets the baseline for OScript object refcounts output by System.RefCounts().

Returns:
True
 o CharEncoding
 Integer CharEncoding(
              [Integer encodingType] )

Gets or sets system character encoding.

Parameters:
encodingType  -  If specified, valid constants are either System.NotEncoded or System.UTF8. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings.
Returns:
The current value. If new value is passed as parameter then the old value is returned.
 o CurrentLocaleSuffix
 String CurrentLocaleSuffix()

Gets the thread current Locale suffix.

Returns:
The current Locale suffix value.
 o DefaultLocaleSuffix
  String DefaultLocaleSuffix()

Gets the system default Locale suffix.

Returns:
The system default Locale suffix value.
 o EOL
  String EOL()

Gets the OS specific line terminator string.

Returns:
The OS specific line terminator string.
 o FilePrefsPath
 String FilePrefsPath(
              [String path] )

Gets or sets the fully qualified path of the default configuration file.

Parameters:
path  -  If specified, this string sets the default path to the configuration file. This argument should only be used at startup and only in a single threaded (Builder) environment, since a cached and shared version of the configuration file is used in multi-threaded environments.
Returns:
The fully qualified String path of the default configuration file.
 o GetLocaleDateFormats
 Assoc GetLocaleDateFormats()

Returns an Assoc containing the date/time formats for all locales.

Returns:
An Assoc containing the date/time formats for all locales.
 o IntlLanguage
 Integer IntlLanguage(
              [Integer languageConstant] )

Gets or sets system language.

Parameters:
languageConstant  -  If specified, valid constants are System.English, System.Japanese, or System.Korean. This is deprecated and has been replaced with the Locale support. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings.
Returns:
The current value. If new value is passed as parameter then the old value is returned.
 o IntlStrings
 Boolean IntlStrings(
              [Boolean flag] )

Gets or sets the system international strings flag.

Parameters:
flag  -  If specified, TRUE directs the system to use string handling routines that support international languages, FALSE indicates the system can use 7-bit ASCII only routines. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings.
Returns:
The current value. If new value is passed as parameter then the old value is returned.
 o LanguageCode
 String LanguageCode()

Returns a three character country code indicating the language in which the string resources were compiled, and the language in which the Livelink .XDBs were compiled. For example: "USA" for American English or "GER" for German.

Returns:
A three character string indicating the language used by the Livelink installation.
 o LibSuffix
 String LibSuffix()

Returns the dotted file extension for a shared library in the environment on which Livelink is running, such as ".DLL".

Returns:
A String containing the dotted file extension.
 o Mac
 Boolean Mac()

True if Livelink is running in a Macintosh environment.

Returns:
True if Livelink is running in a Macintosh environment; False otherwise.
 o Motif
 Boolean Motif()

Not used.

Returns:
False.
 o MultiByte
 Boolean MultiByte(
              [Boolean flag] )

Gets or sets the system multibyte strings flag.

Parameters:
flag  -  If specified, TRUE directs the system to use multibyte string handling routines that support multibyte character sets, FALSE indicates the system will use fixed width character string routines. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings.
Returns:
The current value. If new value is passed as parameter then the old value is returned.
 o Name
 String Name()

Determines the name of the operating system on which Livelink is running.

Returns:
The String name of the operating system on which Livelink is running.
 o ProfileOff
 Boolean ProfileOff()

Not used.

Returns:
Meaningless.
 o ProfileOn
 Boolean ProfileOn()

Not used.

Returns:
Meaningless.
 o RefCounts
 String RefCounts()

Returns a formatted string containing information about the current number of referenced OScript objects.

Returns:
A formatted string containing information about the current number of referenced OScript objects.

The string returned by this method contains 1 line for each refcounted object type. Each line contains 6 fields, separated by 1 or more spaces.

Field 1 is a 4-character Integer, the object type number, i.e. -1 for Strings

Field 2 is a 13-character String, the object type name, i.e. String

Field 3 is a 7-character Integer, the total number of objects of this type allocated on the server

Field 4 is a 7-character Integer, the total number of references to objects of this type allocated on the server

Field 5 is a 7-character Integer, the difference between the current total number of objects of this type allocated on the server and either the total number of objects of this type allocated on the server since the last time System.BaselineRefCounts() was called, or 0 if System.BaselineRefCounts() has never been called.

Field 6 is a 7-character Integer, the difference between the current total number of references to objects of this type allocated on the server and either the total number of references to objects of this type allocated on the server since the last time System.BaselineRefCounts() was called, or 0 if System.BaselineRefCounts() has never been called.

For example, executing this script:

	System.BaselineRefCounts()

	File		test1 = File.StringToFile( "test1.txt" )
	File		test2 = File.StringToFile( "test2.txt" )
	List		test3 = { test1, test2 }


	echo( System.RefCounts() )
	

Would produce output similar to:

	-108 ListExpand          0       0       0       0
	-107 File                2       4       2       4
	-102 Socket              1       1       0       0
	 -86 Vis                59      99       0       0
	 -85 VisTag              0       0       0       0
	 -66 CAPILog             1       1       0       0
	 -63 PrefSection         0       0       0       0
	 -62 DOMParser           0       0       0       0
	 -43 SAXParser           4       4       0       0
	 -18 Assoc             766     770       0       0
	  -9 Fileprefs           3       3       0       0
	  -8 Long                0       0       0       0
	  -7 Date               61      61       0       0
	  -4 Real                0       0       0       0
	  -3 Script          14149   14182       0       0
	  -2 List            10415   10599       1       1
	  -1 String          30709   40246       2       2
  

Examining the output indicates, for instance, that for objects of type -1, String, there were 30709 String objects allocated on the server at that time and that there were 40246 in-memory references to those 30709 Strings. Furthermore, 2 new String objects had been allocated since the last time System.BaselineRefCounts() was called, and each of those new Strings had only 1 reference to them.

Examining the output for objects of type -107, File, shows that there were 2 File objects allocated on the server at that time and that there were 4 in-memory references to those 2 Files. Furthermore, both of those File objects had been allocated since the last time System.BaselineRefCounts() was called.

 o SetCurrentLocaleSuffix
 String SetCurrentLocaleSuffix(
              [String suffix] )

Sets the thread current Locale suffix.

Parameters:
suffix  -  The string should be of the form underscore and 2 char language code, optional underscore and 2 char uppercase country code, optional underscore and variant string. For example: _en_US. This argument can be used on a per request basis in order to set the current Locale for that request. The Locale suffix will be used to load the proper localized string property resources.
Returns:
The old Locale suffix value is returned.
 o Sleep
 String Sleep(
              [String duration] )

Puts the current thread to sleep for a period of time.

Parameters:
suffix  -  The time duration to sleep in milliseconds.
Returns:
True if Sleep times out normally, False if Sleep returns because of a server shutdown notification.
 o ThreadID
 Integer ThreadID()

Returns the unique Integer indicating the current thread identification.

Returns:
A unique identifying integer assigned to the current thread by the operating system.
 o ThreadIndex
 Integer ThreadIndex()

Returns the unique Integer indicating the current thread's index. For more coherent logging and reference, the Livelink server assigns an ordered integer from 1 to n to all threads. In the "single-threaded" Builder environment, the current thread index will always be 0.

Returns:
An integer indicating the current thread index.
 o Unix
 Boolean Unix()

True if Livelink is running in a Unix environment.

Returns:
True if Livelink is running in a Unix environment; False otherwise.
 o Version
 String Version()

Determines the version number of the operating system.

Returns:
A String containing the version number of the operating system.
 o Win32
 Boolean Win32()

True if Livelink is running in a 32-bit Windows environment.

Returns:
True if Livelink is running in a 32-bit Windows environment; False otherwise.
 o Windows
 Boolean Windows()

True if Livelink is running in a Windows environment.

Returns:
True if Livelink is running in a Windows environment; False otherwise.