Difference between revisions of "SYS()"

From Lianjapedia
Jump to: navigation, search
(Description)
 
(10 intermediate revisions by 3 users not shown)
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[ADIR()]], [[DATE()]], [[DAY()]], [[DEFAULT()]], [[DO]], [[INDEXKEY()]], [[KEY()]], [[OS()]], [[PROCNAME()]], [[PROGRAM()]], [[SECS()]], [[SET()]], [[SET TMPDIR]], [[TMPNAM()]]
+
[[ADIR()]], [[CRC32()]], [[DATE()]], [[DAY()]], [[DEFAULT()]], [[DO]], [[INDEXKEY()]], [[KEY()]], [[OS()]], [[PROCNAME()]], [[PROGRAM()]], [[SECS()]], [[SET()]], [[SET TMPDIR]], [[TMPNAM()]]
  
 
==Description==
 
==Description==
 
The SYS() function returns miscellaneous information depending on <expN>.  The arguments and operation of this function are as follows:
 
The SYS() function returns miscellaneous information depending on <expN>.  The arguments and operation of this function are as follows:
  
{| class="wikitable" width=100%
+
{| class="wikitable" width="100%"
!width=30%|Parameter||Description
+
!width="30%"|Parameter||Description
 
|-
 
|-
|SYS(0)||Returns complete host system information
+
|valign="top"|SYS(-1)||[[Runtime Distribution Licenses|runtime distribution license]] Checks the product key.  From v6.0.
 
|-
 
|-
|valign=top|SYS(1)||Returns the current system date as a Julian day number in a character string
+
|valign="top"|SYS(-2,cKey)||[[Runtime Distribution Licenses|runtime distribution license]] Activates the specified product key.  From v6.0.
 
|-
 
|-
|valign=top|SYS(2)||Returns the number of seconds elapsed since midnight in a character string
+
|valign="top"|SYS(-3)||[[Runtime Distribution Licenses|runtime distribution license]] Deactivates the product key.  From v6.0.
 
|-
 
|-
|valign=top|SYS(3)||Returns a unique filenameThis will include the full directory path unless SET TMPNAMPATH is OFF (ON by default)
+
|valign="top"|SYS(-4)||[[Runtime Distribution Licenses|runtime distribution license]] customer nameFrom v6.0.
 
|-
 
|-
|SYS(5)||Returns the current default directory
+
|valign="top"|SYS(-5)||[[Runtime Distribution Licenses|runtime distribution license]] license type.  From v6.0.
 
|-
 
|-
|valign=top|SYS(6)||Returns the current PRINT device as set by the SET PRINTER TO command
+
|valign="top"|SYS(-6)||[[Runtime Distribution Licenses|runtime distribution license]] user limit.  From v6.0.
 
|-
 
|-
|valign=top|SYS(10,d)||Returns the numeric day number 'd' as a character string
+
|valign="top"|SYS(-7)||[[Runtime Distribution Licenses|runtime distribution license]] subscription.  From v6.0.
 
|-
 
|-
|valign=top|SYS(11,s)||Returns a date or character string 's' as a character type Julian day number
+
|valign="top"|SYS(-8)||[[Runtime Distribution Licenses|runtime distribution license]] product key.  From v6.0.
 
|-
 
|-
|valign=top|SYS(12)||Returns remaining available memory in bytes
+
|valign="top"|SYS(-9)||[[Runtime Distribution Licenses|runtime distribution license]] raw license type key.  From v6.0.
 
|-
 
|-
|valign=top|SYS(13)||Returns the status of the printer as "READY" or "OFF-LINE"
+
|valign="top"|SYS(0)||Returns complete host system information
 
|-
 
|-
|valign=top|SYS(14,n[,w])||Returns the index expression for index 'n' in workarea 'w'.  If 'w' is omitted then the current workarea is used
+
|valign="top"|SYS(1)||Returns the current system date as a Julian day number in a character string
 
|-
 
|-
|valign=top|SYS(16)||Returns the name of the currently executing program
+
|valign="top"|SYS(2)||Returns the number of seconds elapsed since midnight in a character string
 
|-
 
|-
|SYS(17)||Returns the CPU type number
+
|valign="top"|SYS(3)||Returns a unique filename.  This will include the full directory path unless SET TMPNAMPATH is OFF (ON by default)
 
|-
 
|-
|valign=top|SYS(18)||Returns the name of the GET field being entered
+
|valign="top"|SYS(5)||Returns 'C:'
 
|-
 
|-
|valign=top|SYS(21)||Returns the order number of the master index.  Note: if the master index is a tag, SYS(21) will always return 1.
+
|valign="top"|SYS(6)||Returns the current PRINT device as set by the SET PRINTER TO command
 
|-
 
|-
|valign=top|SYS(22)||Returns the master index: the tagname or single index file name.  If the master index is a tag, then SYS(22) returns the tag name in upper case.  If the master index is a single index, then SYS(22) returns the index file name in lower case, including the file extension.
+
|valign="top"|SYS(10,d)||Returns the numeric day number 'd' as a character string
 
|-
 
|-
|valign=top|SYS(100)||Returns the status of the CONSOLE setting as "ON" or "OFF"
+
|valign="top"|SYS(11,s)||Returns a date or character string 's' as a character type Julian day number
 
|-
 
|-
|valign=top|SYS(101)||Returns the DEVICE setting as "SCREEN" or "PRINT"
+
|valign="top"|SYS(12)||Returns remaining available memory in bytes
 
|-
 
|-
|valign=top|SYS(102)||Returns the PRINT setting as "ON" or "OFF"
+
|valign="top"|SYS(13)||Returns the status of the printer as "READY" or "OFF-LINE"
 
|-
 
|-
|valign=top|SYS(103)||Returns the TALK setting as "ON" or "OFF"
+
|valign="top"|SYS(14,n[,w])||Returns the index expression for index 'n' in workarea 'w'.  If 'w' is omitted then the current workarea is used
 
|-
 
|-
|valign=top|SYS(2000,s[,1])||Returns the name of the first file matching the pattern 's'.  If the third parameter is included the next matching file is returned
+
|valign="top"|SYS(16)||Returns the name of the currently executing program
 
|-
 
|-
|valign=top|SYS(2001,s[,1])||Returns the current value of the set option 's'.  The optional '1' can be used to return the character setting of certain SET COMMANDS, e.g. ALTERNATE
+
|valign="top"|SYS(17)||Returns the CPU type number
 
|-
 
|-
|valign=top|SYS(2002[,1])||Turns the cursor OFF (sys(2002)) or ON (sys(2002,1))
+
|valign="top"|SYS(18)||Returns the name of the GET field being entered
 
|-
 
|-
|SYS(2003)||Returns the default directory
+
|valign="top"|SYS(21)||Returns the order number of the master index.  Note: if the master index is a tag, SYS(21) will always return 1.
 
|-
 
|-
|valign=top|SYS(2004)||Returns the starting directory for the current process
+
|valign="top"|SYS(22)||Returns the master index: the tagname or single index file name.  If the master index is a tag, then SYS(22) returns the tag name in upper case.  If the master index is a single index, then SYS(22) returns the index file name in lower case, including the file extension.
 
|-
 
|-
|valign=top|SYS(2005)||Returns the currently available resource file
+
|valign="top"|SYS(100)||Returns the status of the CONSOLE setting as "ON" or "OFF"
 
|-
 
|-
|valign=top|SYS(2008 [,<expC> [,<expN>]])||valign="top"|Language compatibility only.
+
|valign="top"|SYS(101)||Returns the DEVICE setting as "SCREEN" or "PRINT"
 
|-
 
|-
|valign=top|SYS(2010)||Return the maximum number of open files for the current user
+
|valign="top"|SYS(102)||Returns the PRINT setting as "ON" or "OFF"
 
|-
 
|-
|valign=top|SYS(2011)||Returns the current lock status, no lock is placed on the record by this command
+
|valign="top"|SYS(103)||Returns the TALK setting as "ON" or "OFF"
 
|-
 
|-
|valign=top|SYS(2012, [<expN> or <expC>])||Returns the memo field block size for dBASE and FoxPro database filesSET COMPATIBLE TO DBASE or FOXPRO must be set.
+
|valign="top"|SYS(2000,s[,1])||Returns the name of the first file matching the pattern 's'If the third parameter is included the next matching file is returned
 
|-
 
|-
|valign=top|SYS(2015)||Returns a unique filenameThis will include the full directory path unless SET TMPNAMPATH is OFF (ON by default)
+
|valign="top"|SYS(2001,s[,1])||Returns the current value of the set option 's'The optional '1' can be used to return the character setting of certain SET COMMANDS, e.g. ALTERNATE
 
|-
 
|-
|SYS(2019)||Returns name and location of current configuration file
+
|valign="top"|SYS(2002[,1])||Turns the cursor OFF (sys(2002)) or ON (sys(2002,1))
 
|-
 
|-
|valign=top|SYS(2023)||Returns the temporary directory location
+
|valign="top"|SYS(2003)||Returns the default directory
 
|-
 
|-
|valign=top|SYS(5000)||Returns amount of currently allocated physical memory for strings
+
|valign="top"|SYS(2004)||Returns the starting directory for the current process
 
|-
 
|-
|valign=top|SYS(5001)||Returns amount of memory allocated for strings
+
|valign="top"|SYS(2005)||Returns the currently available resource file
 
|-
 
|-
|valign=top|SYS(5002)||Returns amount of currently allocated memory for indexes
+
|valign="top"|SYS(2007, <expC> [, <expN1> [, <expN2>]])||valign="top"|Returns the CRC32 checksum for <expC>.
 
|-
 
|-
|valign=top|SYS(5003)||Returns amount of currently allocated memory for symbol table nodes
+
|valign="top"|SYS(2008 [, <expC> [, <expN>]])||valign="top"|Language compatibility only.
 
|-
 
|-
|valign=top|SYS(6001)||Returns current DO level as a character string
+
|valign="top"|SYS(2010)||Return the maximum number of open files for the current user
 +
|-
 +
|valign="top"|SYS(2011)||Returns the current lock status, no lock is placed on the record by this command
 +
|-
 +
|valign="top"|SYS(2015)||Returns a unique filename.  This will include the full directory path unless SET TMPNAMPATH is OFF (ON by default)
 +
|-
 +
|valign="top"|SYS(2017, <expC> [, <expN1> [, <expN2>]])||Returns current record checksum (from Lianja v3.4)
 +
|-
 +
|valign="top"|SYS(2019)||Returns name and location of current configuration file
 +
|-
 +
|valign="top"|SYS(2023)||Returns the temporary directory location
 +
|-
 +
|valign="top"|SYS(5000)||Returns amount of currently allocated physical memory for strings
 +
|-
 +
|valign="top"|SYS(5001)||Returns amount of memory allocated for strings
 +
|-
 +
|valign="top"|SYS(5002)||Returns amount of currently allocated memory for indexes
 +
|-
 +
|valign="top"|SYS(5003)||Returns amount of currently allocated memory for symbol table nodes
 +
|-
 +
|valign="top"|SYS(6001)||Returns current DO level as a character string
 
|-
 
|-
 
|}
 
|}

Latest revision as of 01:16, 26 March 2021

Purpose

Functions to return various system and miscellaneous information

Syntax

SYS(<expN>)

See Also

ADIR(), CRC32(), DATE(), DAY(), DEFAULT(), DO, INDEXKEY(), KEY(), OS(), PROCNAME(), PROGRAM(), SECS(), SET(), SET TMPDIR, TMPNAM()

Description

The SYS() function returns miscellaneous information depending on <expN>. The arguments and operation of this function are as follows:

Parameter Description
SYS(-1) runtime distribution license Checks the product key. From v6.0.
SYS(-2,cKey) runtime distribution license Activates the specified product key. From v6.0.
SYS(-3) runtime distribution license Deactivates the product key. From v6.0.
SYS(-4) runtime distribution license customer name. From v6.0.
SYS(-5) runtime distribution license license type. From v6.0.
SYS(-6) runtime distribution license user limit. From v6.0.
SYS(-7) runtime distribution license subscription. From v6.0.
SYS(-8) runtime distribution license product key. From v6.0.
SYS(-9) runtime distribution license raw license type key. From v6.0.
SYS(0) Returns complete host system information
SYS(1) Returns the current system date as a Julian day number in a character string
SYS(2) Returns the number of seconds elapsed since midnight in a character string
SYS(3) Returns a unique filename. This will include the full directory path unless SET TMPNAMPATH is OFF (ON by default)
SYS(5) Returns 'C:'
SYS(6) Returns the current PRINT device as set by the SET PRINTER TO command
SYS(10,d) Returns the numeric day number 'd' as a character string
SYS(11,s) Returns a date or character string 's' as a character type Julian day number
SYS(12) Returns remaining available memory in bytes
SYS(13) Returns the status of the printer as "READY" or "OFF-LINE"
SYS(14,n[,w]) Returns the index expression for index 'n' in workarea 'w'. If 'w' is omitted then the current workarea is used
SYS(16) Returns the name of the currently executing program
SYS(17) Returns the CPU type number
SYS(18) Returns the name of the GET field being entered
SYS(21) Returns the order number of the master index. Note: if the master index is a tag, SYS(21) will always return 1.
SYS(22) Returns the master index: the tagname or single index file name. If the master index is a tag, then SYS(22) returns the tag name in upper case. If the master index is a single index, then SYS(22) returns the index file name in lower case, including the file extension.
SYS(100) Returns the status of the CONSOLE setting as "ON" or "OFF"
SYS(101) Returns the DEVICE setting as "SCREEN" or "PRINT"
SYS(102) Returns the PRINT setting as "ON" or "OFF"
SYS(103) Returns the TALK setting as "ON" or "OFF"
SYS(2000,s[,1]) Returns the name of the first file matching the pattern 's'. If the third parameter is included the next matching file is returned
SYS(2001,s[,1]) Returns the current value of the set option 's'. The optional '1' can be used to return the character setting of certain SET COMMANDS, e.g. ALTERNATE
SYS(2002[,1]) Turns the cursor OFF (sys(2002)) or ON (sys(2002,1))
SYS(2003) Returns the default directory
SYS(2004) Returns the starting directory for the current process
SYS(2005) Returns the currently available resource file
SYS(2007, <expC> [, <expN1> [, <expN2>]]) Returns the CRC32 checksum for <expC>.
SYS(2008 [, <expC> [, <expN>]]) Language compatibility only.
SYS(2010) Return the maximum number of open files for the current user
SYS(2011) Returns the current lock status, no lock is placed on the record by this command
SYS(2015) Returns a unique filename. This will include the full directory path unless SET TMPNAMPATH is OFF (ON by default)
SYS(2017, <expC> [, <expN1> [, <expN2>]]) Returns current record checksum (from Lianja v3.4)
SYS(2019) Returns name and location of current configuration file
SYS(2023) Returns the temporary directory location
SYS(5000) Returns amount of currently allocated physical memory for strings
SYS(5001) Returns amount of memory allocated for strings
SYS(5002) Returns amount of currently allocated memory for indexes
SYS(5003) Returns amount of currently allocated memory for symbol table nodes
SYS(6001) Returns current DO level as a character string

Example

? sys(0)
system=Win32s on Windows NT nodename=unknown version=6.1 machine=MY-PC