Computers: Universe: Record Commands

COUNT

Syntax: COUNT filename

Counts the records in filename.

CT

Syntax: CT filename recordkey

Displays a record on the screen (stands for 'Copy to Terminal'). If you don't want to actually change a record, saves you loading up the editor just to see what's in it: and eliminates the risk that you'll accidentally change it.

CP

Syntax: CP filename recordkey

As CT, but sends the output to the default printer.

COPY

Syntax: COPY FROM filename1 TO filename2 recordkey1 recordkey2...
or COPY FROM filename1 TO filename2 ALL

The first syntax shown here copies recordkey1 and recordkey2 from filename1 to filename2: unless, that is, records by these keys already exist on filename2, in which case they are not overwritten. The second command works the same way, but copies all of filename1's records.

To copy the records even if it means overwriting, add the word OVERWRITING to your command. To remove the records which get copied from filename1 (effectively moving the records) add DELETING. Finally, copying a lot of records can take a while, and watching a flashing cursor for a minute or more makes me nervous. To get feedback of the record keys as they're copied, add SQUAWK.

CNAME

Syntax: CNAME oldfilename TO newfilename
or CNAME filename oldrecordkey, newrecordkey

The first syntax changes the name of a file: changes both the key of the file pointer record in the VOC and the name of the corresponding UNIX files.

The second syntax changes the key of a record in the file.

EXCHANGE

Syntax: EXCHANGE filename recordkey1 recordkey2

OK, so this is not a command you will use every day, but I like it. This record swaps the contents of two records.

DELETE

Syntax: DELETE filename recordkey1 recordkey2...

Deletes records from a file. Will also work with a select list: just build your list and type DELETE filename.

CLEAR.FILE

Syntax: CLEAR.FILE filename

Removes all the records from a file. Better than deleting them all as it reinitialises the file, collecting all wasted space and so on. The command works from a select list: this is not a recommendation but a warning, for if you do a CLEAR.FILE with an active select list it will look for files with names like those in your list and clear them if it finds them.