The UniVerse command language, called TCL under a number of PICK systems and PERFORM under Prime INFORMATION, was introduced very near the beginning of this course (see The Command Prompt).
Strictly speaking, TCL incorporates all the UniVerse commands shipped with UniVerse (as opposed to you add to the VOC file). Many of these have already been described fully in earlier sections: for instance, seeUniverse Files for CREATE.FILE
, Listing Records for LIST
, and The Editor - ED for, well, ED
. This section introduces what I believe to be the best of the rest: the most common and useful commands not already mentioned. It makes no attempt to be comprehensive. For more specialised commands, and technically complete descriptions of each command, refer to the UniVerse documentation. This selection, though, will get you up and running confidently much more quickly than the sometimes ponderous reference guides.
Many commands have a number of different syntaxes, which allow them to do a number of different things: I haven't tried to show them all, again I focus on the most common and useful ones. Some of the uses are far from intuitive and are easy to tie yourself into knots with. For instance, here is an example COPY
command:
COPY FROM INVOICES TO OLD.INVOICES 0001 0002
Now, even before reading the documentation, it'll be pretty clear that this copies records 0001
and 0002
from the INVOICES
file to the OLD.INVOICES
file. Now look at:
COPY FROM INVOICES TO OLD.INVOICES 0003,0004
Would you have guessed that this copies only one record, and then changes its key? And if both commands were in the same paragraph can you be sure that you, and future maintenance programmers, would notice the vital comma in the second command?
More computer time and utility is lost through bugs and maintenance work than is recovered by tiny performance improvements. Rather than use the 'copy and rename' version of COPY
, recast the second command as follows:
COPY FROM INVOICES TO OLD.INVOICES 0003
CNAME OLD.INVOICES 0003,0004
It's difficult to imagine anyone misunderstanding this.