SECTION 2 -- APPLICATIONS CONCEPTS

This section describes the basic concepts of TAE.

2.1 THE SESSION

A TAE session starts when a user logs onto TAE. The user is then presented with a menu of application functions, or is prompted for a TAE Command Language (TCL) command. (The initial mode of TAE--menu or command-- depends upon options selected by the System Manager.) A menu user executes application functions by selecting them from the menus. A TCL user executes application functions by typing the function names and parameters.

A user may work with menus or commands exclusively for the duration of the session, or may cross between the two modes. The session ends when the user executes a LOGOFF command.

2.2 THE PROC CONCEPT

A "proc" is the entity that is executed to perform an application function.

A proc is either a process or a procedure. A process is a program, i.e., a disk file of executable code activated by TAE as a task. A procedure or "command procedure" is a collection of TAE commands in a file.

Examples of processes are PIXGEN, a (hypothetical) program that generates an image pattern on disk, and PIXDUMP, a program to create a hardcopy printout of a disk image. These two functions could be combined into one procedure called PRINTPAT ("print pattern") which would run PIXGEN followed by PIXDUMP.

In general, the user need not know whether a proc is a procedure or a process; both types of procs are activated using identical TAE features.

2.3 LIBRARIES AND FILES

A "file" is a disk-resident collection of data. Examples of files used in TAE are:

Files under TAE have an implied "type", so that two files with the same name may be distinguished by their types. The acronyms in parentheses above are the types for the files described.

A TAE "library" is a directory containing a collection of files. A library contains proc definition files, compiled proc definition files, help files, executable files, and menu definition files. There are three categories of libraries:

2.3.1 Library and File Names

A proc is uniquely identified by the library name and file name. The syntax for library name and file name is host-dependent. Under the UNIX operating system, for example, a library is a directory specification and a file name is the UNIX file name. See Appendix A for host-specific information.

Example:

	ZOOM  IN = /usr/F1, OUT = /doclib/text/F2

In this example the hypothetical ZOOM proc, running under UNIX, uses the file "/usr/F1" as an input, and the file "/doclib/text/F2" as an output.

2.4 PROC INVOCATION

A proc is invoked using one of the following methods:

2.4.1 Hierarchy Search

When the proc is named on a command line (either for direct invocation or for entry into tutor mode), TAE performs a hierarchy search to locate the proc:

  1. The library of the active user is searched first.

  2. Application libraries that have been specified by the user (or by the system manager in the user's logon proc) are then searched. See the SETLIB command, Section 3.5.4.20.

  3. The system library is searched last.

A similar search is performed to locate menu definition files, however, the system menu library is separate from the system proc library.

The list of application libraries in the search path is set using the SETLIB command and may be displayed using the SHOW-LIB command. See Section 3.5.4.21.

The hierarchy search allows a user to have a "personalized" version of a proc (or menu) in the user library, overriding the version in the system library. Application libraries provide another level in the hierarchy, with a lower precedence than the user library but a higher precedence than the system library.

The hierarchy search may be bypassed by explicitly specifying the library, e.g., the proc name "MYDIR:sysproc" under VAX/VMS would cause TAE to use the sysproc proc in the library MYDIR, bypassing the hierarchy search.

2.4.2 Proc Parameters

Parameter values may be specified on a proc invocation command line, or via tutor mode commands. For example, if a IMGCOPY proc is defined to have parameters FROM and TO, then a valid would be: proc invocation.

	TAE> IMGCOPY  FROM=FILE1  TO=FILE2

Parameter values may also be entered by position:

	TAE> IMGCOPY  FILEl FILE2

If the user does not remember the parameter names, or the order of the parameters, tutor mode may be used to run the proc. In tutor mode, parameter names are displayed along with the corresponding values; the user may change any parameter values before the proc is run. See Section 3.4 for details on tutor mode.

The definition of the proc may have default values assigned for the parameters. If a parameter has a default, the user may invoke the proc without specifying a value for the parameter. Default values are displayed on the tutor screen when tutor mode is entered.

Each parameter may have qualifiers defined. These qualifiers are called parameter qualifiers. See Section 2.4.3 for more details.

2.4.3 Parameter Qualifiers

Parameter qualifiers are qualifiers to proc parameters. Conceptually, parameter qualifiers are like sub-parameters or, parameters to the parameters. On proc invocation, the values of qualifiers to a parameter are specified after the parameter value, set between vertical bars. For example, if a proc named IMGCOPY is defined to have parameters FROM and TO, and the parameter FROM has qualifiers BANDS and FORMAT defined, then the qualifier values may also be specified in the proc invocation as:

	TAE> IMGCOPY  FROM=FILE1|BANDS=(nl,n2) FORMAT="BSQ"|+
	TAE>+         TO=FILE2

Parameter qualifier values, like parameter values, may also be entered by position:

	TAE> IMGCOPY  FILE1|(nl,n2), "BSQ"| FILE2

If the user is not sure whether qualifiers are defined for a parameter, or does not remember the parameter qualifier names or the order of the parameter qualifiers, tutor mode may be used to run the proc. In tutor mode, parameter qualifiers may be requested to be displayed in the same format as the parameters; the values of the parameter qualifiers may be changed before the proc is run. See Section 3.4 for details on tutor mode.

Parameter qualifiers may have defaults just as parameters. However, when qualifiers are present parameter defaults are not allowed. Consequently, no confusion is possible between qualifiers for commands and qualifiers for parameters.

2.4.4 Global Variables

A global variable is a variable whose value is accessible by all procs. Once a global variable is assigned a value, it retains that value across proc invocations. Global variables are useful when several different procs need access to a single value. Global variables are described in Section 3.2.2.

2.4.5 Subcommands

Some procs may perform several different but related functions, each of which requires a different set of parameters. These functions are called "subcommands". For example, a magnetic tape utility proc, TAPE, might have the following subcommands and associated parameters:

A subcommand is specified as a suffix to the proc name, separated with a hyphen. No spacing is allowed between the command name and the hyphen.

Example:

	TAE> TAPE-REWIND  UNIT=5
	TAE> TAPE-SPACE  UNIT=5 FILES=-3

A command may have a default subcommand. The TAPE command, for example, might have REWIND as the default subcommand. TAE would then interpret the command "TAPE UNIT=5" to mean "rewind unit 5".

2.5 TAE MODES OF OPERATION

A user interacting with TAE is considered either a menu user or a TCL user. Section 2.5.1 describes how a user may switch between menu use and TCL use.

A menu user invokes applications by locating and selecting them through a series of menus. Each menu consists of a list of entries, each entry representing an application function (i.e., a proc) or another more detailed menu. When an application function is selected, TAE usually enters tutor mode to prompt the user for the proc's parameters.

Menu operations are described in Section 3.3.

A TCL user invokes procs directly, by typing the proc name and the required parameters. TCL is ready to accept input when the "TAE>" prompt appears. Section 3.5 describes TCL in more detail.

Tutor mode may be entered by both menu users and TCL users. The purpose of tutor mode is to allow the user to review the parameters associated with a proc and to enter values for the parameters. The names and values for all parameters are displayed first, and the user is permitted to change the values, tutor on the parameter qualifiers, run the proc, or exit. Tutor mode operations are described in Section 3.4.

"Help" information is available from any TAE mode. The types of help information available are:

When a HELP command is typed, a help screen is displayed and the user may then request more information or return to normal operations. See Section 3.6 for a description on how to access and use TAE help.

2.5.1 TAE Mode Transitions

Figure 2.5-1. shows the responses that allow a user to switch between menu, tutor, and TCL use; the transitions are

  1. COMMAND is a menu response that causes a menu user to become a TCL user.

  2. MENU is a TCL response that allows a TCL user to become a menu user.

  3. If a proc entry on a menu is selected, TAE enters tutor mode for parameter specification. When directed by the user, tutor mode activates the proc.

  4. When a proc terminates or the user exits from tutor mode, the most recently displayed menu is re-activated.

  5. For a TCL user, the TUTOR command causes tutor mode to be entered for a particular proc.

  6. When a proc terminates or the user exits from tutor mode, the TCL prompt re-appears.

Note that tutor mode, in order to distinguish between transition (4) and transition (6), remembers whether the user is a menu user or a TCL user.

Figure 2.5-1

MODE TRANSITION DIAGRAM

2.6 SUBMITTING BATCH JOBS

A VMS user may elect to have a proc executed by the TAE batch processor. When a TCL user invokes a proc with the command qualifier RUNTYPE set to "BATCH", the proc is added to a batch queue and the user is free to continue with other tasks. (See Section 3.5.2.3 for a description of TCL command qualifiers.) Example:

	TAE> IMGCOPY |RUNTYPE=BATCH| INFILE, OUTFILE

A proc may also be submitted for batch execution from the menu mode by selecting the BATCH-SUBMIT entry in the menu UTIL.

When a proc is executed by the batch processor, the proc is run as it would run under interactive control except that the output that normally goes to the terminal is written to a file. The file is a "LOG" type file with the same name as the proc.

There may be more than one batch queue on a TAE host. The number of batch queues on a given TAE host is dependent on the local installation (as configured by the system manager). The name of the queue to which a proc is submitted is specified by the user.

The status of a submitted batch job is displayed using the BATCH-STATUS command (Section 3.5.4.2) or the SHOW-BATCH command (Section 3.5.4.21).

The values of globals for the proc running under batch are the same as the globals of the submitting interactive session at the time of submission. In addition, the library search order and the user-defined commands are the same as for the submitting session.

A user may also create batch job files for submission to the system batch queue. The use of this feature is dependent on the host computer system and will also have site dependent variations. See Appendix A, "Host Dependent Operations" for more information.

2.7 SUBMITTING ASYNCHRONOUS JOBS

A user may elect to have a proc executed asynchronously. A proc submitted for asynchronous execution runs simultaneously with interactive activity, i.e., after submission of the proc, the user may proceed with other interactive commands. Before executing a proc asynchronously under VMS, the user should check that the current account has sufficient VMS quotas. See the "TAE Plus System Manager's Guide" or your system manager.

There are two types of asynchronous jobs, the normal ASYNC job, and the ASYNC-PROCESS job. The main difference between the asynchronous jobs is that the ASYNC-PROCESS job has no associated Terminal Monitor.

A proc is submitted for asynchronous execution using the RUNTYPE command qualifier; for example, the following commands request that the IMGCOPY proc be executed asynchronously as a normal ASYNC job or as an ASYNC-PROCESS job:

	TAE> IMGCOPY |RUN=ASYNC| INFILE, OUTFILE

or

	TAE> IMGCOPY |RUN=ASYNC-PROCESS| INFILE, OUTFILE

A proc may also be submitted for asynchronous execution from the menu mode by selecting the ASYNC-SUBMIT entry in the menu UTIL.

2.7.1 Normal ASYNC Jobs

Normal asynchronous execution is similar to batch execution in that:

The differences between batch and asynchronous are as follows:

2.7.1.1 Requests for Dynamic Parameters

A normal asynchronous job may, at any time during its execution, request "dynamic" parameters, i.e., parameters in addition to those used to submit the asynchronous job. When an asynchronous job needs dynamic parameters, the interactive user is notified and the job waits until the interactive user executes the REPLY command (Section 3.5.4.17). To view the list of asynchronous jobs waiting, enter the SHOW-WAITING command (Section 3.5.4.21).

The sequence of events for a dynamic parameter request from -a normal asynchronous job is as follows:

  1. The asynchronous job reaches a point in execution where dynamic parameters are required. The request is passed to the interactive session and the asynchronous job waits.

  2. If the interactive user is a menu user, the next menu prompt will list the REPLY command in addition to the standard. menu commands. On terminals that support highlighting, the REPLY portion of the prompt will be highlighted. The REPLY will continue to be displayed on the menu screen as long as an asynchronous job is waiting for parameters.

  3. If the interactive user is a command user, the following message is displayed when the asynchronous job requests dynamic parameters:

    [TAE-ASYNCREQ] ASYNC job requesting parameters.  Use REPLY command.
  4. The interactive user may, at any time following the dynamic request, execute the REPLY command. The REPLY command enters dynamic tutor mode so that the user may supply the requested parameters.

  5. During a dynamic tutor dialog initiated by REPLY, the EXIT command terminates execution of the asynchronous job. The HOLD command exits dynamic tutor keeping the asynchronous job in the waiting list for a later REPLY. The RUN command continues execution of the asynchronous job.

  6. Following the EXIT, HOLD or RUN command, the interactive user continues with menu mode or command mode as appropriate.

2.7.2 ASYNC-PROCESS Jobs

The purpose of the ASYNC-PROCESS feature is to provide efficient asynchronous execution for those applications willing to comply with the restrictions below.

An ASYNC-PROCESS job is similar to a normal ASYNC job in the following ways:

An ASYNC-PROCESS is different from a normal ASYNC job in the following ways:

2.7.3 Controlling Asynchronous Job Execution

The following commands may be used to control the execution of asynchronous jobs:

In addition, the following commands are available for exchanging TCL variables between the user and a normal asynchronous job or between two normal asynchronous jobs:

2.7.4 Asynchronous Job List

TAE maintains a list of the 100 most recent asynchronous jobs. The information maintained for each job is sufficient to generate the SHOW-ASYNC report described in Section 3.5.4.21. An entry is placed in the list whenever an asynchronous job is submitted; the entry is removed from the list when:

In general, the user does not have to be concerned with managing the list with the REMOVE command, however, REMOVE is of use in the following situations:

2.7.5 Notification of Asynchronous Job Completion

The ASYNCEND command qualifier may be used to request notification of asynchronous job completion. See Section 3.5.2.3 for details.

2.8 SESSION LOGGING

If session logging is enabled, a record of proc invocations is logged to a disk file. The session log may be displayed using the SESSLOG utility. Session logging is not available in batch or asynchronous jobs.

Session logging is enabled using the TCL ENABLE-LOG command, and disabled using the DISABLE-LOG command. The name of the session log file is "SESSION" and the type is "TSL".

Appendix B describes the format of the session log file.

2.9 MESSAGES

Messages may be displayed at the terminal by a proc or by the Terminal Monitor. These messages, which may be error messages or information messages, include a "message key" that uniquely identifies the message. The TCL command, "HELP-MESSAGE" followed by the message key, displays details on the message. See Section 4 for additonal information.