SYSTEM Functions

The following system functions are supported by jBASE 3.x:

SYSTEM(0) Return the last error code
SYSTEM(1) Return 1 if output directed to printer
SYSTEM(2) Return page width
SYSTEM(3) Return page depth
SYSTEM(4) Return no of lines to print in current page. (HEADING statement)
SYSTEM(5) Return current page number (HEADING statement)
SYSTEM(6) Return current line number (HEADING statement)
SYSTEM(7) Return terminal type
SYSTEM(8) Return record length for tape channel 0
SYSTEM(9) Return CPU milliseconds
SYSTEM(10) Return 1 if stacked input available
SYSTEM(11) Returns the number of items in an active select list or 0 if no list is active
SYSTEM(12) Return 1/1000, ( or 1/10 for ROS), seconds past midnight
SYSTEM(13) Release time slice
SYSTEM(14) Return the number of characters available in input buffer. Invoking SYSTEM(14) can cause in a slight delay in program execution.
SYSTEM(15) Return bracket options used to invoke command
SYSTEM(16) Return current PERFORM/EXECUTE level
SYSTEM(17) Return stop code of child process
SYSTEM(18) Return port number or JBCPORTNO
SYSTEM(19) Return login name or JBCLOGNAME. If the system_19_timedate emulation option is set then the number of seconds since midnight December 31, 1967 is returned.
SYSTEM(20) Return last spooler file number created
SYSTEM(21) Return port number or JBCPORTNO
SYSTEM(22) Reserved
Return status of the break key
0 Enabled
1 Disabled by BASIC
2 Disabled by Command
3 Disabled by Command and BASIC
SYSTEM(24) Return 1 if echo enabled, 0 if echo disabled
SYSTEM(25) Return 1 if background process
SYSTEM(26) Return current prompt character
SYSTEM(27) Return 1 if executed by PROC
SYSTEM(28) Reserved.
SYSTEM(29) Reserved.
SYSTEM(30) Return 1 if paging is in effect (HEADING statement)
SYSTEM(31) Reserved
SYSTEM(32) Reserved
SYSTEM(33) Reserved
SYSTEM(34) Reserved
SYSTEM(35) Return language in use as a name or number (ROS)
SYSTEM(36) Reserved
SYSTEM(37) Return thousands separator
SYSTEM(38) Return decimal separator
SYSTEM(39) Return money symbol
SYSTEM(40) Return program name
SYSTEM(41) Return release number
SYSTEM(42) Reserved
SYSTEM(43) Return port number of item lock
SYSTEM(44) Return 99 for jBASE system type
SYSTEM(45) Reserved
SYSTEM(46) Reserved
SYSTEM(47) Return 1 if currently in a transaction
SYSTEM(48) Reserved
SYSTEM(49) Return PLID environment variable
SYSTEM(50) Return login user id
SYSTEM(51) Reserved
SYSTEM(52) Return system node name
SYSTEM(53) Reserved
SYSTEM(100) Return program create information
SYSTEM(101) Return port number or JBCPORTNO
SYSTEM(102) Reserved
SYSTEM(1000) Return command line separated by attribute marks
SYSTEM(1001) Return command line and options
SYSTEM(1002) Return temporary scratch file name
SYSTEM(1003) Return terminfo Binary definitions
SYSTEM(1004) Return terminfo Integer definitions
SYSTEM(1005) Return terminfo String definitions
SYSTEM(1006) Reserved
SYSTEM(1007) Return system time
SYSTEM(1008) Return SYSTEM file path
SYSTEM(1009) Return MD file path
SYSTEM(1010) Return Print Report information
SYSTEM(1011) Return jBASE release directory path. JBCRELEASEDIR
SYSTEM(1012) Return jBASE global directory path. JBCGLOBALDIR
Return memory usage (Unix only):
<1> Free memory small blocks
<2> Free memory large blocks
<3> Used memory small blocks
<4> Used memory large blocks
SYSTEM(1014) Return relative PROC level
SYSTEM(1015) Return effective user name. LOGNAME
SYSTEM(1016) Return tape assignment information
SYSTEM(1017) Return platform. UNIX, WINNT or WIN95
SYSTEM(1018) Return configured processors
SYSTEM(1019) Return system information (uname -a)
SYSTEM(1020) Return login user name
SYSTEM(1021) jBASE release information:
<1> Major release number
<2> Minor release number
<3> Patch level
<4> Copyright information
SYSTEM(1022) Returns the status of jBASE profiling:
0 no profiling is active
1 full profiling is active
2 short profiling is active
3 jCOVER profiling is active
SYSTEM(2002) Return 1 for international date format, return 0 otherwise
SYSTEM(2003) Return PID of root process

Entries above 2000 are for system use only.