554
BKG System Variable
Background Process Status
Numeric System Variable
Contents
Integer, process status code.
Description
The BKG variable contains the following numeric status codes:
0
Zero. Current program is directly connected to a terminal user
(background/ghost process).
1
Current program is not directly connected to a terminal user
(background/ghost process).
Examples
->?BKG
0
CHN System Variable
Channels Open
Numeric System Variable
Contents
Numeric string, current open channels.
Description
This system variable contains a listing of all currently open channels. The value
returned is a string of numeric two-byte values. The CHN variable indicates channel
values below 65000.
Examples
To obtain the hex values, use the HTA( ) function.
->?HTA(CHN)
0000001E
In the above example, DEC($0000$)=0 (i.e., the console) and DEC($001E$)=30
(the open file's channel).
->?(LEN(CHN)/2)-1
Yields the number of files opened.