Back-to-Basics: Where (AP style)
Multi-value Solutions
Nathan Rector
Natec Systems
nater@northcoast.com
http://www.northcoast.com/~nater/
WHERE {ports to display} {(options}
The WHERE statement is a good tool to use to track the use of your system, or to find problems ports when your system starts to slow.
The WHERE statement shows the activity on each port logged on and what each port is currently doing. With this tool you are able to create moniting programs that have the ability to keep your users from sitting at TCL or doing things in the debugger. The Advanced Pick style, also used in D3, is a lot more descriptive than the R83 style which makes it easier to understand at first glance and doesn't need much translation. Next month we will cover the R83 sytle WHERE statement.
There are 2 pieces of information to keep a close watch on: the STAT, which tells the user what the current status of the port is, and the 'Return stack content', which tells the users what abs frames are currently running.
The STAT column tells you if the port is at the system debugger, or if it is accessing a tape media. It can also tell you if the port has pushed a TCL level or not, and how many times.
The 'Return Stack Content' is the most useful when trying to find the port that is causing the system to slow. It displays the current frames that are processing on each ports.
Frame definitions:
PP - Phantom
WS - Workspace
BR - BASIC runtime
SP - Spooler
RDL - Generalized Input
BC - BASIC Compile
OVF - Overflow
RET - Item Retrieval
UPD - Item Update
PL - PicLan
EC - ACCESS (parser)
EL - ACCESS (display)
ES - ACCESS (Selection)
JET - Jet
AU - Update Processor or TCL
TP - Tape I/O
CTS - SCSI Tape
TL - Transaction logger
BD - BASIC debugger
PQ - PROC
ED - Editor
PX - FlashBASIC Runtime
LK - Link
RS - Restore
SV - Save
CS - Compusheet+
OP - Output Processor
GFE - GFE Handler
COM - Comm
FM - File Manager
BT - Btree
TV - Tape verify
Port to display:
user-id = Ouput ports that are current logged on under this user id
"Account" = output port that are current logged onto this account
port#{-port#} = output all ports that meet this range of ports
options:
h = suppress the heading
l = display status for each 'pushed' level
n = no pause on screen output. This keeps the output from pausing at the end of the page requiring the user to press RETURN to continue.
p = send output to printer
z = Display all ports logged on or off. If it is used with a specific
:where
Ln PCB PIB ABS Stat R1 & Return stack contents 11:00:53 20 Mar
FID Stat Base
*000 00278A FF10 0033B1 1 ws.where1:01E ws.whatwhere:236
003 000803 BF10 000018 P sp.sleep:027 sp.spoolout:07A
005 002894 BF10 000018 P pp.sched:02A
Alphabet Soup Definitions:
'Pushing a TCL Level' - With the Release of Advanced Pick, users were giving the ablitiy to suspend a current process and create a new TCL level when ever the break-key was pressed. This is what is referred as 'Pushing a TCL level'
ABS Frames - The ABS Frames are the operating systems programs, or any assembily programs that exist on a Pick or Pick-style system
RETURN Stack content - Found when using the WHERE statement. In simple terms, the RETURN stack content is the list of system level programs, or ABS Frames, that a port is currently running. Ie: Access select, debugger, and/or BASIC command being processed.