tips:revmedia:r97

Lesser-known TCL Commands

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies18 DEC 19912.1XINTERMEDIATETCL, COMMANDS, VOC

This bulletin lists, and describes some lesser-known TCL commands. The purpose is to highlight these commands or, in some cases, to clarify or amend documentation for them.

TCL commands are usually records in the VOC file. Any entry in the VOC file that points to object code in the VERBS file is likely a TCL command. Developers can, therefore, explore the VOC file and browse for new or undocumented commands at any time.

Most of the commands listed here are of limited use, thereby explaining their obscureness. However, some AW, CW, DIR, EVAL, LO, SETFILE, and RENAMEFILE are very useful, or have features or capabilities often overlooked. We have found in Technical Support that a firm knowledge of these secondary TCL commands can speed development time and solve occasional problems.

There are several sets of synonyms (e.g. GETLIST and GET-LIST). A table of synonyms appears at the end of the bulletin. Synonyms occasionally provide a shortcut (e.g. MLIST) or appear for historial reasons (especially true of hyphenated commands such as SAVE-LIST). Even if you don't use the synonyms, you may encounter applications that do.

The table of synonyms was generated by looking for matching object code names in the VOC records. Object code names are in field 4. The following two R/LIST statements provided the basic list from which the synonyms were derived:

SSELECT VOC WITH F4 BY F4
LIST VOC BREAK-ON F4

Command: '?'

Used in pairs (e.g. SELECT ?Enter file name?), to prompt for any portion of a TCL command. Used primarily in TCL batch commands. Does not check or valide user input.

Documented: yes, TCL manual under Batch.

Command: 'AW'

Runs a window, by default a window in the TEMPLATES file (hence AW: "Application Window"). Syntax:

AW {template_filename} window_name

No other options (e.g. DATAFILE=) are supported. Documented: yes, TCL manual; syntax in manual is incomplete.

Command: BUILD.FIELD

Rebuilds the %FIELDS% record in a dictionary. Syntax:

BUILD.FIELD filename

Obsolete for AREV 2.0+ due to structure changes in %FIELDS%. Documented: no.

Command: CAPTURE.MODIFY

Allows editing of Capture scripts from TCL; equivalent to Tools-Capture-Modify.

Documented: no.

Command: CW

Displays a command window (a window whose template is in the COMMANDS file); example: CW SETVOLUME.

Documented: yes, TCL manual.

Command: DBASE

Displays the DBASE bond menu.

Documented: yes, Bonding section.

Command: DEPEND.UPDATE

Builds the %WINDOWS% table (recalculate dependencies) for one or more window templates, normally maintained automatically by DICT.MFS. Useful if the table has been corrupted. Syntax:

DEPEND.UDPATE template_file template_name
DEPEND.UDPATE template_file
*DEPEND.UDPATE template_file {,template_file ...}

In the last example, all templates in the named files are assumed. Documented: no.

Command DIR

Executes a direct DOS DIR command from TCL (passing through all options such as /P).

Documented: no; indirectly referenced in Technical Bulletin #21.

Command: EVAL

Executes R/BASIC code directly from TCL. Multiple lines are delimited with a semicolon (;). No preprocessing of code is done, hence no comments, case conversion, EQU statements, DECLARE statements, or $INSERT records are allowed. Because each execution of EVAL puts a new program on the program stack, it is not recommended for use inside a loop.

Documented: yes, TCL manual, but the syntax incorrectly lists ampersand () as the line delimiter.

Command: HELP.LEVEL

Resets the current help level, if at TCL level 1, by displaying the help level popup.

Documented: no.

Command: LO

Lists record keys for a file. Much quicker than R/LIST LIST ONLY, but displays only keys.

  • uses @CRTHIGH as the width.
  • there is no View window (hence no paging).
  • no sort or selection criteria are allowed (though it will process an active select list).

Documented: yes, under ONLY in R/LIST.

Command: PAINT.FORM

Enters Paint ready to paint a Form (equivalent to Design-Reports-Form), hence a different set of [F10] options from Paint, and the template is stored in REPORTS.

Documented: yes, under Paint, though incompletely.

Command: PASSWORD

Changes the password for the current account or a user directly from TCL. Syntax:

CHANGE-PASSWORD old_password new_password username

If no old password is supplied, the second word is assumed to be a new password (no username can appear). If the account is not SYSPROG, only the password for the current user name can be changed.

Documented: yes, TCL manual, but doesn't include all syntax variants.

Command: QUERY

Displays a window in query mode. Syntax:

QUERY {template_file} window

Documented: yes, TCL manual, but syntax doesn't note replacement file name.

Command: RENAMEFILE

Renames an attached file; includes the option to assign the file to a new account (including GLOBAL).

Documented: yes, TCL manual.

Command: SETFILE

Several related functions:

  1. Creates a synonym for an existing file
  2. Grants access to a file on another account.
  3. Grants access to a file with the same name as an attached file.

Documented: yes, TCL manual.

Command: SUM

Sums values in a field.

Documented: yes, TCL manual.

Command: UPGRADE.ACCOUNT

Updates individual files in an account after a general upgrade procedure has updated the system. Documented: no.

CLEAR          CLEARLIST
CLEARFILE      CLEAR-FILE
COMPILE        BASIC
DEFINEFILE     MAKEFILE, CREATE-FILE*
DELETEACCOUNT  DELETE-ACCOUNT
DELETEFILE     DELETE-FILE
DELETEREC      DELETE
DELLIST        DELETE-LIST
EW             EASY.WRITER
GETLIST        GET-LIST
LIST           SORT%%**%%
LISTDICT       LOOKDICT
LISTFILES      MLIST
LISTVOL        LISTMEDIA
LOGOFF         OFF
MAKEACCOUNT    CREATE-ACCOUNT
MAKELIST       FORM-LIST
MAKEVOC        CATALOG
NAMEVOLUME     NAMEVOL, NAMEMEDIA
PASSWORD       CHANGE-PASSWORD
RECORDCOPY     COPY
REDEFINEFILE   REMAKEFILE, RECREATE-FILE
RENAMEFILE     RENAME-FILE
SAVELIST       SAVE-LIST
SELECT         SSELECT%%**%%
SETFILE        SET-FILE
TERMINAL       TERM
UNMAKEVOC      DELETE-CATALOG

* Not true synonyms because DEFINEFILE displays the DefineFile window if executed with no parameters.

** Not true synonyms, because the synonym adds the qualifier BY @ID onto the end of the command.

  • tips/revmedia/r97.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1