Skip to content

Internal verbs

Internal.cs implements the built-in commands of the MVsharp runtime: list handling, locks, printers, account management, tape dump and load, and so on.

How a command gets here

  1. Process (in Process.cs) tokenises the command line and looks up the verb in the VOC.
  2. If VOC attribute 1 is Internal, it calls new Internal(tokens, session).
  3. All of the work happens in the constructor. It dequeues the first token and switches on it:

    switch (thisToken.Value.ToUpper().Replace("-", "."))
    

    As a result:

    • Verbs are case-insensitive.
    • - and . are interchangeable (COPY-LIST is the same as COPY.LIST).

    There is no default case

    A verb that is routed here but has no case does nothing, and prints no error.

  4. Each case reads its own arguments from the tokens queue.

  5. Errors are reported in one of two ways:
    • By throwing Exception. The caller displays the message.
    • By printing a message and returning.

Each verb's code sits inside a #region with the verb's name, so you can search for the region name to find it.

Verb lists and UPDATE.VOC

The lists at the top of the class (compilerVerbs, internalVerbs, databaseVerbs, externalVerbs) aren't used for dispatch. UPDATE.VOC uses them to write each verb into the VOC with the correct module in attribute 1.

Adding a new internal verb

You must do two things:

  1. Add a case.
  2. Add the verb to internalVerbs. Without this, UPDATE.VOC won't register it.

The other data lists are also only used by UPDATE.VOC, INIT.DICT.DICT and INIT.ERRMSG:

List Contents
dictVoc, vocDicts DICT VOC records
dictDicts DICT.DICT contents
errmsgs ERRMSG contents
filePointers, directoryFiles, dataFiles System files that UPDATE.VOC creates or points to
d3sysnonums Synonyms: LOGTO|TO, LISTF|LF, VOC|MD
executeStatements, fileNames BP file and the statements run at the end of UPDATE.VOC (MVsharp or Netbasic build)

Conventions in this document

  • [x] means optional. {a|b} means choose one.
  • Options are letters that follow an option bracket. The tokenizer turns ( into a token of type O with value OB. For example, COPY BP X (O uses option O.
  • "Select list 0" is the default active select list. SYSTEM(11) tests whether it is active.
  • &SAVEDLISTS& is opened into session.SavedListsFile.

Verb index

Area Verbs
Session and terminal OFF, LOGTO, WHO, WHERE, DATE / TIME, TERM, ECHO.ON / ECHO.OFF / P, HUSH, BREAK.KEY.ON / OFF, CONTROL.CHARS, AUTOLOGOUT, ECLTYPE, DATE.FORMAT, CLR / CLS / CS, DISPLAY, SLEEP, RESET, CLEARDATA, CLEARPROMPTS, CLEARCOMMON, SET.DEBUGGER
Users and processes LISTU, LISTUSER, LOGOFF, MESSAGE, TANDEM, PORT.STATUS, REMOTE.DEBUG, PHANTOM, Z / ZH / ZD / ZS
Locks LOCK, CLEAR.LOCKS, LIST.LOCKS, LIST.READU, UNLOCK
Select and saved lists SAVE.LIST, GET.LIST, DELETE.LIST, EDIT.LIST, COPY.LIST, MERGE.LIST, LIST.UNION / DIFF / INTER, COMPARE.LIST, END
Records and files CT / LIST.ITEM, COPY, COMPARE, DELETE, UP / UPDATE, SEARCH / ESEARCH, COUNT, SPOOL, CONVERT.UTF8, SET.FILE, LISTF / LISTFILES, CD / COMPILE.DICT
Output capture COMO, DIVERT.OUT
Printing SETPTR, SP.ASSIGN, ADD.FORM, SETPDF, LISTPTR, SP.STATUS, SP.OPEN / SP.CLOSE
Caching and statistics CACHE / CLEAR.CACHE / LIST.CACHE, STATS / PROFILE
Backup and restore T.DUMP, T.LOAD, ACCOUNT.RESTORE
Account setup UPDATE.VOC / UPDATE.MD, INIT.DICT.DICT, INIT.ERRMSG, DEPLOY.SQLSERVER / UPDATE.SQLSERVER
Server and licence SHOW.CONFIG / SHOW.LICENSE / VERSION, UPDATE.LICENSE, REST.CONFIG, FAILOVER / CLEAN.USERS / SYNC.CLUSTER

Server ports used

Several verbs talk to the MVsharp service over SocketClient:

Port Used by
9000 (localhost, or the user's app server) MESSAGE, LOGOFF, REST.CONFIG, FAILOVER, CLEAN.USERS, SYNC.CLUSTER, SHOW.CONFIG, SHOW.LICENSE, VERSION
8999 SYNC.CLUSTER, LIST.READU LOCAL
9001 UPDATE.LICENSE, UPDATE.VOC (getAccount, serverPath)
9002 PORT.STATUS (getCluster)
session.SysControl LISTU, LISTUSER, LOGOFF, TANDEM, LOGTO
session.LockControl All lock verbs
Per-process debug port PORT.STATUS, REMOTE.DEBUG

Session and terminal

OFF / LO / LOGOUT / QUIT / BYE / EXIT

OFF

Terminates Session.messageServer, stops BufferedConsole, and calls Environment.Exit(1).


LOGTO (TO)

Syntax
LOGTO account [M|F]

Switches the session to another account. The steps are:

  1. Changes the process directory to the account path and calls session.ChangeDirectory().
  2. Clears the file caches.
  3. Re-initialises the VOC and session, and tells SysControl about the switch.
  4. If the typed name is a synonym, sets @ACCOUNT and @WHO to the typed name.
  5. Unless the login type is NetObj, it does three things:
    • Prints a connect-time line (d3Mode only).
    • Processes VOC MVSHARP.CONFIG.
    • Runs the LOGIN paragraph. In d3Mode, it runs the VOC item named after the account instead, if there is one.
  6. Calls ValidateAccount.

M or F skips the login paragraph.

Errors: Invalid account <name>


WHO

Syntax
WHO [CHANGEWHO|CHANGEBACK]

Prints the user number, account and user:

  • Non-D3 mode: also prints the SQL database if one is set.
  • d3Mode: the field order depends on the static pickWho flag. CHANGEWHO sets the flag and CHANGEBACK clears it. These keywords are case-sensitive, and the setting lasts for the life of the process. pickWho also affects the U50BB user exit in BasicRuntime.cs.

WHERE

WHERE

Prints the current directory.


DATE / TIME

DATE
TIME

  • DATE prints the date. The format depends on session.d3Mode and session.EuropeanDate. d3Mode also shows the internal and Julian dates.
  • TIME prints TIMEDATE().

TERM (TERM.TYPE)

Syntax
TERM
TERM driver
TERM width,depth,skip,lfdelay,ffdelay,backspace,prtwidth,prtdepth
  • TERM shows the terminal and printer settings.
  • TERM driver selects a screen driver. Driver names are case-sensitive:

    Driver Accepted names
    console console
    ansi ansi
    wyse50 wyse50, W, w
    vt220 vt220, vt100, j, J
    addsvp addsvp, V, v
  • TERM width,depth,... sets dimensions by position. You can leave any position empty to keep its current value.

Note

You can't set a driver and dimensions in the same command.

Errors:

  • An unknown driver name.
  • A non-integer value.
  • A depth less than 1.

ECHO.ON / ECHO.OFF / P

ECHO.ON
ECHO.OFF
P

Turns terminal echo on or off. P toggles it.


HUSH

HUSH {ON|OFF}

Turns hush mode on or off by calling Functions.HUSH.


BREAK.KEY.ON / BREAK.KEY.OFF

BREAK.KEY.ON
BREAK.KEY.OFF

Sets session.BreakKeyOn.


CONTROL.CHARS

Syntax
CONTROL.CHARS [N|F]
  • N ignores control characters.
  • F stops ignoring them.
  • With no argument, it reports the current state.

The report is inverted

See Known issues.


AUTOLOGOUT

Syntax
AUTOLOGOUT [seconds|0|OFF]

Starts or stops an idle timer. When the session has been idle for the given time, the process exits with code 0. With no argument, it shows the current setting.


ECLTYPE

ECLTYPE [U|P]

Sets session.RunMode: U sets 1 (U2) and P sets 2 (Pick). With no argument, it shows the current mode.


DATE.FORMAT

Syntax
DATE.FORMAT [ON|OFF|INFORM]
  • ON / OFF set session.EuropeanDate.
  • INFORM sets @SYSTEM.RETURN.CODE to 1 if European dates are on, otherwise 0.

CLR / CLS / CS

CLR
CLS
CS

Clears the screen with SCREEN_CONTROL(-1).


DISPLAY

DISPLAY text

Prints the first token with double quotes removed.


SLEEP

Syntax
SLEEP [seconds | hh:mm]
  • No argument: sleeps 1 second.
  • A number: sleeps that many seconds.
  • A time: waits until that time, which may be tomorrow. AUTOLOGOUT is suspended while it waits.

RESET

RESET

Clears these caches and settings:

  • Subroutine, Python and JavaScript function caches.
  • BP file cache.
  • Select lists.
  • File cache.
  • PrinterIsOn.

It then runs a GC and prints:

Output
All session values have been reset!

CLEARDATA

CLEARDATA

Clears the DATA stack (session.AtDataPending).


CLEARPROMPTS

CLEARPROMPTS

Clears paragraph <<prompt>> answers (Paragraph.promptList).


CLEARCOMMON

CLEARCOMMON

Clears unnamed and named COMMON.


SET.DEBUGGER

SET.DEBUGGER [target]

Sets session.remoteDebug. With no argument, it sets it to empty.


Users and processes

LISTU

LISTU [filter]

Lists logged-in users from SysControl with these columns:

  • Pid (your own process is marked *)
  • Port
  • Account
  • Login Id
  • Date/Time
  • Type
  • Last command

filter is a case-insensitive substring match on each line. The total count shown includes users that the filter hides.


LISTUSER

LISTUSER [filter]

Same as LISTU, but shows different columns: Pid, User, Type, IP, Date/Time and Machine.


LOGOFF

LOGOFF [pid]

  • LOGOFF with no argument exits the current process at once. Unlike OFF, it doesn't stop the message server first.
  • LOGOFF pid sends logoff|pid to the app server that hosts that process.

MESSAGE

Syntax
MESSAGE {*|pid|userid} [text]

Sends a message to other users:

  • * sends to every process.
  • A number sends to that pid.
  • Any other value sends to every process for that user ID. The match is case-sensitive.

If you don't give any text, it prompts for it. Delivery failures are ignored.


TANDEM

TANDEM pid

If the pid is logged in, outputs STX STX pid ETX to attach to that session.

Errors: Expected Pid after TANDEM, Invalid Pid after TANDEM


PORT.STATUS

Syntax
PORT.STATUS [PORT pid action]
  • No arguments: lists every process with its account, type, and current program and line.
  • PORT pid action: sends a request to that process's debug port. Valid actions:

    Action Effect
    STACK Show the call stack.
    FILES Show open file variables.
    VAR / VARIABLES Show variables. Values are truncated to 55 characters.
    TRACE Send a trace request.
    BREAK Break into the process.
    DEBUG / DEBUGGER Start debugging.
    PROFILE ON|OFF|CLEAR Control profiling.
    PROFILE IMPORT Copy the remote process's statistics into this session.

REMOTE.DEBUG

REMOTE.DEBUG pid

Connects to the debug port of a running process and opens an interactive :: prompt.

  • var, files and stack replies are formatted.
  • q quits.

Note

The "no argument" error message says "PORT", but the argument is a pid.


PHANTOM

Syntax
PHANTOM [BRIEF] [SQUAWK] [D3|D3S] command

Runs command in the background with Phantom.exe, or with dotnet Phantom.dll on Linux:

  • Creates &PH& if needed.
  • Passes context to the child in Phantom_* environment variables.
  • Sets @STATUS to the child pid.
Option Effect
BRIEF No start message.
SQUAWK Print the &PH& item name.
D3 D3-style [438] Job #pid submitted. message.
D3S Like D3, and also no "Exited" message when the job ends.

Z / ZH / ZD / ZS

Z command
ZS command

D3 shortcuts. Z command runs PHANTOM command. ZS adds D3S. Z, ZH and ZD behave the same.


Locks

There are 64 system locks, numbered 0–63. They are held by the lock server at session.LockControl. The 0–63 range isn't checked locally.

LOCK

Syntax
LOCK n [NO.WAIT|PROMPT]
  • By default, it waits until it can set lock n.
  • NO.WAIT fails at once with Unable to set Lock "n" if the lock is already held.
  • PROMPT sets the lock from a phantom process.

CLEAR.LOCKS

CLEAR.LOCKS [n]

Clears all locks held by this process, or only lock n.


LIST.LOCKS

LIST.LOCKS

Shows an 8×8 grid of locks 0–63 and who holds each one.


LIST.READU

LIST.READU [LOCAL]

Lists file locks and record locks. LOCAL queries localhost:8999 instead of LockControl.


UNLOCK

Syntax
UNLOCK {ALL | USER name | PID pid | FILE filename}

Releases locks held by everyone, a user, a process, or on a file.


Select and saved lists

SAVE.LIST

Syntax
SAVE.LIST [listname] [FROM n]

Saves select list n (default 0) as record listname in &SAVEDLISTS&, creating &SAVEDLISTS& if needed. The default name is &TEMP<pid>&. If the list isn't active, it saves an empty list.

SAVE.LIST dirfile listname checks that dirfile is a directory file, but still writes to &SAVEDLISTS&.


GET.LIST

Syntax
GET.LIST [name ...] [UNIQUE] [TO n]

Loads one or more saved lists, joined together, into select list n (default 0). Sets @SELECTED.

  • UNIQUE removes duplicates. It is case-sensitive.
  • In d3Mode, you must give a name.

DELETE.LIST

DELETE.LIST name

Runs DELETE &SAVEDLISTS& name.


EDIT.LIST

EDIT.LIST name

Runs ED &SAVEDLISTS& name.


COPY.LIST

COPY.LIST name [args]

Runs COPY &SAVEDLISTS& name args.


MERGE.LIST

Syntax
MERGE.LIST l1 {UNION|INTERSECT|INTERSECTION|DIFF} l2 [TO l3 [COUNT.SUP]]

Combines two active select lists (by number) into l3 (default 0). Sets @SELECTED and @SYSTEM.RETURN.CODE. COUNT.SUP suppresses the message.


LIST.UNION / LIST.DIFF / LIST.INTER

Syntax
LIST.UNION list1 [list2] [target]

Combines two saved lists with a set operation and saves the result as target. If list2 or target is missing, the verb prompts for it. The results are de-duplicated.


COMPARE.LIST

Syntax
COMPARE.LIST list1 op list2 [outlist] [(G]

D3 style. Combines two saved lists and saves the result to outlist, or back over list1 if outlist is omitted. Option G activates the result with GET.LIST.

Operator Result
& Intersection (distinct)
<> Items in list1 that aren't in list2 (distinct)
= Union (distinct)
+ Concatenation (keeps duplicates)
- list1 with the first occurrence of each list2 item removed

END

END

Runs CLEARSELECT (D3 style).


Records and files

CT (LIST.ITEM)

Syntax
CT [DICT] file [id ... | *] [(S P N]

Displays records with numbered attributes. It uses the ids you give, then any active select list. If you give no ids and no list is active, or you use *, it displays the whole file.

Option Effect
S No line numbers.
P Send to the printer.
N No paging.

COPY

There are two syntaxes. The verb chooses between them by whether the first argument is FROM.

Pick style

Syntax
COPY [DICT] file {* | id ...} [(options]

Then it prompts TO:. Valid answers:

Answer Destination
Empty Display only
newid ... Same file, new ids
(destfile [newid ...] Another file
(DICT destfile [newid ...] Another file's dictionary
(unix:/path [newid ...] An OS directory (d3Mode only)

If no ids are given, it uses the active select list.

Option Effect
O Overwrite existing records.
D Delete the source after copying (a move).
T Display instead of copying (uses CT).
P Print instead of copying. Implies T.
I, S Suppress the per-record messages. S also removes line numbers in T/P output.
N No paging. See Known issues: N makes the copy do nothing.

Information style

Syntax
COPY FROM [DICT] src [TO [DICT] dest] [ALL] [OVERWRITING] [DELETING] [NUM.SUP] [id[,newid] ...]

Choosing the keys:

  1. Explicit ids are used first.
  2. Otherwise, ALL copies every record.
  3. Otherwise, the active select list is used.
Keyword Effect
OVERWRITING Replace existing records.
DELETING Remove the source after copying.
NUM.SUP Hide the record count.
UPDATING Accepted, but currently behaves the same as DELETING; see Known issues.
BINARY Ignored.

If both files are flat (directory) files, it copies with File.Copy.


COMPARE

Syntax
COMPARE [DICT] file1 file2 {* | id}

Also works with an active select list. Compares records in the two files. The file types must match.

  • Directory files: compared line by line.
  • Other files: compared attribute by attribute. Values are trimmed before comparing.
Output
<id> UNIQUE TO <file>
@F<n> file1 = ... file2 = ...
MISMATCHED NUMBER OF ATTRIBUTES

Note

In @F<n>, n is 0-based.


DELETE

Syntax
DELETE [DICT] file [id ... | ALL]

Deletes the given ids, or all ids in the active select list. ALL deletes every record in the file. Prints N Record(s) Deleted.

There's no confirmation prompt


UP / UPDATE

Syntax
UP [DICT] file [id ... | dictfield ...]

Opens records in the full-screen UpdateProcessor editor. An active select list takes priority over ids on the command line. Dictionary names on the command line pick which fields the editor shows.

Exit actions:

  • Exit
  • File
  • File and stay
  • File + COMPILE + CATALOG
  • File + COMPILE + RUN
  • Delete
  • File as new name (rename)

Syntax
SEARCH [DICT] file

Prompts STRING: repeatedly until you enter a blank line. Puts into select list 0 every record that contains any of the strings. The match is a case-sensitive substring match. It searches the active list, or the whole file.


COUNT

Syntax
COUNT [DICT] file [criteria]

Counts the records and prints N record(s) counted. Sets @SELECTED. If you give criteria, it runs a SELECT with them.

Note

The verb must be typed exactly as COUNT followed by a space, because the criteria are taken from @SENTENCE after the first 6 characters.


SPOOL

SPOOL file id

Prints one record to printer 0, one line per attribute.


CONVERT.UTF8

Syntax
CONVERT.UTF8 dirfile [id ...]

Rewrites the OS files in a directory file in UTF-8 (with a BOM) and CRLF line endings. It converts the given ids, or all records. This replaces select list 0.


SET.FILE

Syntax
SET.FILE [account [filename [vocname]]]

Creates a Q-pointer in the VOC (default name QFILE). Prompts for any value you leave out. If the remote file can't be opened, it removes the Q-pointer and reports an error. An existing Q-pointer with the same name is overwritten, but it won't overwrite a VOC item of any other type.


LISTF (LISTFILES)

LISTF

Lists every VOC file pointer with its type and whether it opens. Multi-part data files are listed indented under their parent file.


CD (COMPILE.DICT)

CD file [id ...]

Recompiles the I-type dictionary items: either all of them, or only the ids you give. Prints a success or error line for each item.


Output capture

COMO

Syntax
COMO {ON name | OFF | LIST | SPOOL name | DELETE name}

Captures terminal output to &COMO&/<name>, creating &COMO& if needed. The file name is escaped with EscapeName. LIST, SPOOL and DELETE pass through to the LIST, SPOOL and DELETE verbs.


DIVERT.OUT

Syntax
DIVERT.OUT ON dirfile id [TRUNCATE] [APPEND] [TTY.OFF|TTY.ON]
DIVERT.OUT {OFF | FILE.ON | FILE.OFF}

Sends output to a sequential file in a directory file.

  • TTY.OFF stops output going to the screen as well.
  • FILE.ON / FILE.OFF pause and resume capture without closing the file.

Printing

SETPTR

Syntax
SETPTR unit,width,depth,top,bottom,mode[,option ...]

Configures session.Printers[unit]. The arguments are parsed from @SENTENCE by splitting on commas.

Setting Default
unit 0
width 132
depth 66
top 0
bottom 0
mode 1

Mode 3 means hold: output is not printed.

Options:

  • COPIES n
  • AT device
  • FORM name
  • BANNER or AS followed by name, UNIQUE [prefix] or NEXT [prefix]
  • BRIEF: don't display the settings afterwards.

SP.ASSIGN

Syntax
SP.ASSIGN [n][?][A][H][S][Fnn][Rnn]

D3 style. Looks up form Fnn in &DEVICES& and runs the matching SETPTR.

Option Effect
n Number of copies (one leading digit).
? Run SETPTR and stop.
A Slave (auxiliary) printing.
H Hold.
S Suppress printing.
Fnn Form. Default F0.
Rnn Printer unit.

The init and reset sequences named in the form record are applied to printer 0.


ADD.FORM

Syntax
ADD.FORM formno,width,depth,top,bottom[,AT printer][,INIT seq ...][,RESET seq ...]

Writes a form definition to the printer file (&DEVICES&), which SP.ASSIGN uses.


SETPDF

Syntax
SETPDF [font,size,orientation,papersize,top,left]

With no arguments, shows the current PDF settings. With arguments, sets session.PdfDef.

  • Orientation: 1 = landscape.
  • Paper size: 0 = A4, 1 = A3, 2 = A2, 3 = Letter, 4 = Foolscap, 5 = Legal.

LISTPTR

LISTPTR

Lists OS printers: from WMI Win32_Printer on Windows, or lpstat -t on Linux.


SP.STATUS

SP.STATUS

Lists print jobs from System.Printing. Does nothing in the Core build.


SP.OPEN / SP.CLOSE

SP.OPEN
SP.CLOSE

Turns printer output on or off (Functions.PRINTER(true/false)).


Caching and statistics

CACHE / CLEAR.CACHE / LIST.CACHE

CACHE file ...
CLEAR.CACHE
LIST.CACHE

  • CACHE file ... adds files to the session file cache.
  • CLEAR.CACHE empties the cache and runs a GC.
  • LIST.CACHE lists the cached files.

STATS / PROFILE

Syntax
STATS {ON | OFF | CLEAR | DISPLAY {FILEIO|FUNCTIONS|SUBROUTINES|EXECUTES|ITYPES|ITYPEDETAIL}}

Controls and displays the runtime statistics (session.SystemStats).


Backup and restore

T.DUMP

Syntax
T.DUMP [DICT] file [path]

Dumps the active select list, or the whole file, to an OS file. Prompts for the path if you leave it out.

  • d3Mode: writes a D3 tape image: a label, then 512-byte blocks with a 12-byte pad. It uses writeTapeLabel and writeTapeBlock.
  • Other modes: writes one line per record, in the form id þ LOWER(record).

T.LOAD

Syntax
T.LOAD [DICT] file [path]

Reverses T.DUMP. In d3Mode it reads the tape image with getTapeLabel and getTapeBuffer. In other modes it writes the records in batches of 5000.


ACCOUNT.RESTORE

Syntax
ACCOUNT.RESTORE [account] [OVERWRITE] [SKIP filename]

Prompts for the path of a D3 account-save file. It also reads continuation files named path-1, path-2, and so on. It restores the data into the current account:

  • MD items go to D3.MD.
  • Each dictionary and data section becomes a file, created with CREATE.FILE.
Option Effect
account Restore only that account from a multi-account save.
OVERWRITE Replace existing records.
SKIP filename Skip everything before that file.

Warning

You can't run it in the MVsharp account itself.


Account setup

UPDATE.VOC (UPDATE.MD)

UPDATE.VOC

Rebuilds the standard contents of the current account. It does these steps in order:

  1. Creates the BP file pointer (MVsharp.BP or Netbasic.BP), plus the &DEVICES& and NEWACC pointers.
  2. Creates &HOLD&, &PH&, &LOGS& and &SAVEDLISTS& if they don't exist.
  3. Creates DICT.DICT and ERRMSG if they don't exist.
  4. Writes a VOC entry for every verb in the four verb lists. An existing RESET entry is kept.
  5. Writes the VOC dictionary items.
  6. Creates the synonyms TO, LF and MD.
  7. Copies any missing source programs from the server's Sources folder.
  8. In d3Mode, copies the NEWACC items into the VOC.
  9. Runs executeStatements: compiles and catalogs the BP file, then runs INIT.MS.FILES.

INIT.DICT.DICT

INIT.DICT.DICT

Creates DICT.DICT and loads the dictDicts items into it.


INIT.ERRMSG

INIT.ERRMSG

Creates ERRMSG and loads the errmsgs items into it.


DEPLOY.SQLSERVER (UPDATE.SQLSERVER)

DEPLOY.SQLSERVER
UPDATE.SQLSERVER

Sets the session's SQL Server database to TRUSTWORTHY, then runs SqlServerDeploy.txt (for DEPLOY) or SqlServerUpdate.txt (for UPDATE) from the executable's folder. The script is split on GO lines, which must have CRLF line endings. Errors containing "Cannot drop" are ignored.


Server and licence

SHOW.CONFIG / SHOW.LICENSE / VERSION

SHOW.CONFIG
SHOW.LICENSE
VERSION

All three print the runtime, service and SSH versions.

  • SHOW.CONFIG also prints the licence configuration: serial, cores, users, expiry, MvSync and high availability.
  • SHOW.LICENSE also prints the licence text.

UPDATE.LICENSE

UPDATE.LICENSE

Prompts for a licence key and sends it to the service on port 9001.


REST.CONFIG

REST.CONFIG

Prompts for the REST server settings: server, user and password, connection pool sizes, idle timeout and port. Sends them to the service on port 9000.


FAILOVER / CLEAN.USERS / SYNC.CLUSTER

FAILOVER
CLEAN.USERS
SYNC.CLUSTER

High-availability commands sent to the local service:

Verb Effect
FAILOVER Migrates users to the secondary server.
CLEAN.USERS Restores the user table.
SYNC.CLUSTER Syncs both cluster nodes (ports 9000 and 8999).

Helper methods

Member Purpose Used by
ValidateAccount(Session) Creates the minimum VOC entries and files for a new Hashed account. Exceptions are swallowed. LOGTO
writeTapeBlock(writer, data) Writes 12 NULs plus 500 characters of data, and returns the remainder. data must be at least 500 characters. T.DUMP
writeTapeLabel(writer, fileName) Writes a 512-byte D3 tape label. T.DUMP
getTapeLabel(reader) Reads and validates a tape label, and returns its text. T.LOAD
getTapeBuffer(reader, buf, blockSize) Appends the next block's data to buf. blockSize isn't used. T.LOAD
AutoLogout_Elapsed Timer handler that exits the process when the session is idle. AUTOLOGOUT
proc_exited Prints [pid] Exited :cmd when a phantom ends. PHANTOM
EscapeName(name) Escapes % * \ : " > < / | for OS file names. COMO
printerDef Printer row: name, status, device. LISTPTR (Linux)