3.4 TUTOR MODE OPERATIONS

This section describes tutor operations for users with ASCII ("dumb") displays. Tutor mode assists the user in specifying the parameters and the parameter qualifiers for a proc. Tutor mode is entered when:

There are two types of tutor:

The tutor commands "SCREEN" and "NOSCREEN" switch between the two forms of tutor.

There are three types of tutor display:

3.4.1 Screen Tutor

In screen tutor, the user is presented with the first page of a (possibly) multi-page display showing information on each parameter of the selected proc or each qualifier of the selected parameter. For each parameter/qualifier, the tutor display presents the following items:

An example of a tutor parameter screen is shown in Figure 3.4-1. An example of a tutor qualifier screen is shown in Figure 3.4-2.

The "current value" of a parameter/qualifier--the value displayed on the screen--is established in one of the following ways:

The tutor commands allow the user to scroll between pages of the tutor display, switch between qualifier and parameter displays, update a parameter/qualifier value, request detailed information for a parameter/qualifier, save parameter and qualifier values on disk, restore parameter and qualifier values from disk, and activate the proc. The commands are described in Table 3.4-1. (The notation parm/qual" indicates parallel commands available in parameter and tutor qualifier displays, with either "parm" or "qual" applicable.)

Figure 3.4-1

SAMPLE TUTOR PARAMETER DISPLAY


Tutor:  proc "XPTEST", library "SYSSUSER: [JOE]"                       Pg 1+

    Demonstration of XP Subroutine Package

  parm         description                            value
  ----         -----------                            -----

FILE        File name of image to test.         "IMAGE 15"   
            |THIS PARAMETER HAS QUALIFIERS|

THRESHLD    Probability threshold               2. 45983E-04




Enter: parm=value,HELP,PAGE,SELECT,SHOW,RUN,EXIT,SAVE,RESTORE; RETURN to page.
?

Figure 3.4-2

SAMPLE TUTOR QUALIFIER DISPLAY


Tutor/Qualifiers: parameter "FILE", proc "XPTEST"                         Pg 1.

  qual             description                            value
  ----             -----------                            -----

WINDOW         Pixel window: pixell, pixel2,                      0     (1)
               line1, line2                                     511     (2)
                                                                  0     (3)
                                                                511     (4)

FORMAT         Format of the file: BIL or BSQ         "BSQ"      




Enter: qual=value, HELP, PAGE, SHOW, ACCEPT; RETURN to page.
?
	

Table 3.4-1

Tutor Parameter/Qualifier User Options

parm/qual=value
A new value is assigned to the parameter "parm" or qualifier "qual". If the parameter/qualifier is multi-valued, the values must be entered in order, separated by commas and/or spaces. Variable de-referencing is not allowed; however, variable substitution is allowed. The null value may be assigned using "--" if the parameter/qualifier is nullable.

parm(i)/qual(i)=value
The ith element of a multi-valued parameter/qualifier is set.

parm/qual=
The current value becomes the value that was initially displayed when the tutor session started.

HELP
Help information on the operation of tutor mode is displayed.

HELP parm/qual
Detailed text describing the parameter "parm" or qualifier "qual" is displayed. The last page of the help display is a detailed description of the parameter's/qualifier's definition.

HELP *
Text describing the current proc is displayed.

HELP -
Detailed text describing the current proc subcommand is displayed.

?
Help on the last message is displayed.

PAGE parm/qual
The display page with parameter "parm" or qualifier "qual" is displayed.

PAGE n
Page number "n" is displayed. If no page number is provided, the next page is displayed.

SET parm-specifications
The SET command accepts parameter specifications using TCL proc invocation syntax. With SET, several parameters may be given values with one tutor command. In addition, the positional and/or explicit form of parameter specification may be used. The following is an example of a SET command entered at the bottom of a tutor screen:
?  SET parm1=value1 parm2=value2 parm3=value3

If an error is found in the SET command line, parameter values up to the point of the error are accepted by tutor.

QUALIFY parm
The tutor display is shown for qualifiers of parameter "parm".

SHOW parm(i)/qual(i)
The ith element of a multi-valued parameter/qualifier is displayed. The option is especially useful when the parameter/qualifier has more elements than will fit on one screen.

RUN
The proc is executed. This command is available only in tutor parameter display. If any mandatory parameter or qualifier values are unspecified at the time of the RUN, an error message is displayed and the proc is not executed.

Parameter and qualifier values may be supplied on the RUN command line using TCL proc invocation syntax. If parameter and qualifier values are specified and an error is found in the command line, values up to the point of the error are accepted but the proc is not executed.

EXIT
The tutor mode session is terminated without running the proc. TAE returns to menu mode or command mode as appropriate. This command is available only in tutor parameter display.

ACCEPT
This command is only available in the qualifier display. It takes the display back into the parameter tutor with qualifiers set to the latest values.

SAVE filename
The current parameter and qualifier values are saved in the disk file "filename". If "filename" is omitted, the current proc name is used. "Filename" may contain an explicit library name. This command is available only in tutor parameter display.

RESTORE filename
The parameter and qualifier values are restored from the "filename". If "filename" is omitted, the current proc name is used. "Filename" may contain an explicit library name. This command is available only in tutor parameter display.

RESTORE LAST
The parameter and qualifier values are restored from the most recent tutor RUN. This command is available only in tutor parameter display.

Carriage Return
The display moves to the next page. If Carriage Return is typed while on the last page, TAE displays the first page

NOSCREEN
This command enters the "NOSCREEN" form of tutor.

SCREEN
The SCREEN command switches to the screen form of tutor from the noscreen form of tutor.

HOLD
For asynchronous jobs, HOLD places the asynchronous job's dynamic request for parameters in the wait queue.

SELECT parm
The SELECT commands allows displaying and selecting valid string values (a VALID list) for a specified parameter.


The following rules apply to tutor commands:

  1. Parameter/Qualifier values

    See Section 3.2.1 for rules on entering acceptable parameter/qualifier values.

    If the "parm(i)/qual(i)=value" form is used and if all or some of the values before the i-th value have not yet been set, the values not yet set are set to zero or the empty string, depending on the type of the variable.

    Parameter/qualifier values for KEYWORD parameters/qualifiers may not be entered using the flag character (') syntax.

  2. Page numbers

    The "+" adjacent to the page number in the upper-right corner of the tutor display indicates that there are more pages in the display; if the character in that position is a period, there are no more pages.

  3. Abbreviations

    Tutor commands may be abbreviated by truncating characters, e.g., "SH" is equivalent to "SHOW". Parameter/qualifier names may be similarly abbreviated provided that uniqueness is maintained, e.g., "WINDOW" may be abbreviated "WI" if no other parameter/qualifier for the proc/parameter starts with "WI".

  4. Case sensitivity

    Case is not significant for tutor mode command names and parameter/qualifier names, e.g., "window" is equivalent to "WINDOW".

  5. Exiting from tutor

    The RUN command activates the proc. When the proc terminates, TAE returns to a menu or to command mode as appropriate. When returning to a menu, the menu displayed is, in most cases, the menu from which the proc was selected. It is possible, however, for a proc to force a different menu.

  6. Aborting a proc

    After typing the "RUN" command, the user may terminate the proc prematurely by using the host-dependent "attention sequence" to gain TAE's attention and responding with "ABORT" to the TAE prompt. This proc interrupt capability is described in Section 3.2.6. After the abort, TAE places the user in command mode or menu mode, depending upon the mode from which tutor was initiated.

  7. SAVE and RESTORE

    The SAVE and RESTORE commands provide for collections of parameter sets. SAVE can be used at any time in tutor parameter display. The command causes the current parameter and qualifier values to be saved on disk. The parameters and qualifiers may be subsequently restored in a future (or the same) tutor session.

    Unlike the RUN command, SAVE does not require that all mandatory parameters and qualifiers have values. The SAVE command does not change current values. If the filename is omitted from the SAVE command, the parameter set, which includes parameters with their qualifiers, is saved using the current proc name as the file name.

    The RESTORE command sets current tutor values from the named disk file. If the file name is omitted from the command, TAE assumes that the parameter set file name is the current proc name.

  8. RESTORE LAST

    When a proc is activated from tutor mode, an implicit "SAVE LAST" command is executed. Thus, in tutor mode, the "RESTORE LAST" command retrieves the most recent parameter set. This feature is especially useful in the case where a number of values are specified for a proc and the proc terminates prematurely because one of the values is unacceptable.

  9. HELP

    The HELP commands place TAE in help mode. (See Section 3.6 for operations in help mode.)

3.4.1.1 Tutor SELECT

This feature gives the user the ability to view the complete list of acceptable strings for a chosen parameter, and to select the string to be used as the parameter's value. The following are requirements for using "select" mode:

  1. The user must be running TAE from a VT100 compatible terminal.

  2. The user must be using tutor in "SCREEN" mode.

  3. The user may use "select" mode only for parameters which take a string value and have a specified list of allowable strings (i.e., VALIDs).

A user enters tutor-select mode from the normal tutor mode by typing the command: "select p", where "p" is the name of a string parameter whose value is to be set. Alternatively, the user may highlight a parameter for selection by using the arrow keys. Tutor-select mode for the highlighted parameter may be entered by clearing the prepared command from the screen ( CTRL-U ) and typing the command: "select", without parameter name.

Suppose, for example, that the user had entered tutor mode for a PROC named "SATPROC" which has a parameter "SATNAME". If the user types the command: "select satname", the screen shown in Figure 3.4-3 will be displayed.

Commands in tutor select mode are provided to position to an item on the list; to get help on tutor select operation or on the last error message; to return to the main tutor screen using the selected value; and to return to the main tutor screen without setting a value. The operations are described in Table 3.4-2.


Figure 3.4-3

SAMPLE TUTOR SELECT DISPLAY


Tutor/Select:  parameter "SATNAME", proc "SATPROC"

         Name of satellite.

Selection List
------------------------           
ATS-3
ATS-6
GOES-1
GOES-2
GOES-3
TIROS-N
Viking-1
Viking-2
LandSat-1
LandSat-2
SeaSat
NAVSTAR
OSCAR-10
GEOS
Pioneer-1O

Enter= ?, up-arrow, down-arrow, SEARCH, HELP, ACCEPT, EXIT
?

TABLE 3.4-2

Tutor Select Operations

?
Display help information on the last error message.

Up-arrow, Down-arrow
Move the current item up or down one item in the list. The "current" item is highlighted.

GOLD/Up-Arrow, GOLD/Down-arrow
The PF1 key is the GOLD key for TAE operations. Pressing the GOLD key followed by an arrow key moves the current item up or down by the number of items on the screen. The "current" item is highlighted.

SEARCH sub-string
Position to the next item in the list that contains the indicated sub-string. The search is forward from the current item and wraps around to the top of the list if not found before the end.

HELP
Help information on the operation of the tutor select screen of tutor mode is displayed.

ACCEPT
Return to main tutor mode; use the currently highlighted selection as the value for the parameter.

EXIT
Return to main tutor mode; do not use the currently highlighted selection. The value of the selected parameter is unchanged.

The following additional notes apply to tutor select:

3.4.1.2 Relationship Between Parameter Tutor and Qualifier Tutor

Qualifier tutor can only be entered through parameter tutor by entering QUALIFY followed by a parameter name. Tutor then displays a page of qualifiers for the selected parameter. Operations for altering the values in qualifier tutor are the same as those for parameter tutor. Other operations such as, RUN, EXIT, SAVE or RESTORE are not allowed in qualifier tutor; the only method for leaving the qualifier display is through the ACCEPT command.

3.4.1.3 Manipulation of Displays with Multi-valued Parameters

When a multi-valued parameter has more values than can fit on one tutor screen, only one full screen is shown. Tutor maintains a window on the elements of the parameter. Unless a particular element is referenced (either via "parm(i) =" or "SHOW parm(i)"), the display window initially includes the first element. The contents of this window can be moved using the SHOW command.

For example, if the parameter named RCTABLE has 30 values, the 25th value will not appear on the initial tutor screen. Typing "RCTABLE(25)=32" causes TAE to set RCTABLE(25) to 32 and scroll the tutor display so that RCTABLE(25) is shown. If this is followed by "SHOW RCTABLE(12)" TAE scrolls the tutor display so that RCTABLE(12) is shown.

3.4.1.4 Subcommands

As described in Section 2.4.5, a proc may have subcommands. To initiate tutor for such a proc (or command) the proc name must be followed immediately by a hyphen and the subcommand name.

Example:

	TAE> TUTOR TAPE-COPY

If tutor mode is entered, only the parameters associated with the specified subcommand are displayed.

If the subcommand name is not specified and there is no default subcommand, tutor mode begins with a "subcommand" display, showing a description of each of the proc's subcommands. The tutor user selects a subcommand from the display and TAE begins a normal tutor session for the parameter set associated with the subcommand.

If there is a default subcommand, the tutor subcommand display may be explicitly requested using "TUTOR proc-".

Figure 3.4-4 is an example of a page from a tutor subcommand display. Table 3.4-3 is a description of the user options for tutor subcommand displays.

Figure 3.4-4

SAMPLE TUTOR SUBCOMMAND DISPLAY


Tutor/Subcommands: proc "BATCH", library "TAE$LIB" Pg 1+ Batch Job Queue Manipulation subcommand description ---------- ----------- DELETE Delete job from queue. ***DEFAULT*** STATUS Display queue status. SUSPEND Suspend queue. Operator privilege required. RESUME Resume queue operation. UPDATE Update priority of existing job. Enter: -subcommand, -, HELP, PAGE, or EXIT; RETURN to page. ?

Table 3.4-3

TUTOR SUBCOMMAND USER OPTIONS

-sub
Select the subcommand named "sub" and enter tutor mode for its parameters.

-

If no subcommand is given, that is, if a hyphen alone is typed, then the subcommand marked "***DEFAULT***" is used for entering into the tutor parameter display.

HELP

Help information on the operation of the subcommand screen of tutor mode is displayed.

HELP sub or HELP -sub
Detailed text describing the subcommand "sub" is displayed.

HELP *
Text describing the current proc is displayed.

PAGE sub or PAGE -sub
The display page with subcommand "sub" is displayed.

PAGE n
Page number "n" is displayed.

Carriage Return
The display moves to the next page.

3.4.1.5 Tutor Editor

For certain CRT terminals, tutor responses typed by the user may be edited before execution. In addition, existing parameter values may be retrieved for editing. Under the VAX/VMS implementation of TAE, VT100 and VT100-compatible terminals have this feature. To set up terminals for arrow keys for UNIX, see Appendix A.2.2 "Note".

The tutor editor is similar to the command editor (Section 3.2.5), but special features exist to take advantage of the tutor display. When TAE prompts for a tutor mode response, the following special keys may be used to edit a tutor command:

In addition to the basic keys above, the GOLD key (labelled "PF1" on many terminals) may precede a special key to "exaggerate" the meaning as follows:

When the up and down arrows are used, TAE highlights the current value on the tutor display if the terminal supports highlighting. (Under VAX/VMS implementations of TAE, special VMS DCL commands may be required in order to enable highlighting; see Appendix A of the "TAE Command Language (TCL) Programmer's Manual" for DCL commands.)

3.4.2 Noscreen Tutor

Noscreen is a special form of tutor that does not require a CRT terminal. Noscreen tutor exists for the following situations:

When tutor mode is activated, the noscreen form is used if any of the following are true:

Operation of noscreen tutor is similar to screen tutor; the differences are as follows:

Example of a noscreen tutor session:

	TAE>TUTOR XPTEST
	Parameters Requested:  FILE, and THRESHLD.
	Parameters with Defined Qualifiers:  FILE.
	TAE-XPTEST>LIST
	    FILE = "IMAGE15"
	    |THIS PARAMETER HAS QUALIFIERS|
	    THRESHLD = 2.45983
	TAE-XPTEST>QUAL FILE
	'FILE' Parameter Qualifiers Requested: WINDOW, and FORMAT.
	TAE-XPTEST>LIST
	    WINDOW=no value
	    FORMAT="BSQ"
	TAE-XPTEST>WINDOW = (0, 511, 0, 511)
	TAE-XPTEST>LIST WINDOW 
	    WINDOW= (0, 511, 0, 511)
	TAE-XPTEST>ACCEPT	
	TAE-XPTEST>RUN

3.4.3 Dynamic Tutor

After a proc has been initiated, the proc may use tutor mode to interactively solicit additional parameters from a user. This feature is called "dynamic tutor". (Note that a user may be presented with a tutor screen even though "TUTOR" was never typed.)

The collection of parameters that participate in a dynamic tutor session may be the same collection used to initiate the proc, a subset of the original collection, or an entirely different collection.

All normal tutor mode commands are available in dynamic tutor. The EXIT and RUN commands have a slightly different meaning: EXIT means to terminate the proc and RUN means to continue execution of the proc with the newly specified values.

A special dynamic tutor command, the HOLD command allows a user to enter dynamic tutor for a given job (using REPLY), then decide to continue execution of the job at a later time. See Section 2.7.1.1 for detailed discussion on dynamic tutor for asynchronous jobs.

Dynamic tutor starts in the tutor form indicated by the global variable $DYNTUT, which is initially set to "NOSCREEN". $DYNTUT may be set to "SCREEN" using LET $DYNTUT="SCREEN". Once in dynamic tutor mode, the user may switch form by entering the SCREEN or NOSCREEN command.

3.4.4 Compressed Tutor

Compressed tutor is a more compact form of TAE's traditional tutor display: with compressed tutor, the line spacing between parameters is omitted, allowing up to 18 scalar parameters on a 24-line display. Compressed tutor may be requested "per-PDF" or "session-wide":

  1. OPTIONS=COMPRESSTUTOR on the PDF's introductory command (PROCESS, PROCEDURE, PARMSET, or GLOBALS) requests compressed tutor for the specific PDF.

  2. Setting the $TUTOPT global variable to "COMPRESS" requests compressed tutor for all subsequent tutor sessions. When $TUTOPT contains "COMPRESS", all PDFs are treated as if OPTIONS=COMPRESSTUTOR were specified. Typically, $TUTOPT would be set by placing the following TCL line in the SLOGON.PDF or ULOGON.PDF:

    	let $tutopt = "compress"
    

    (Note that the $TUTOPT global is a nullable vector, so to remove the global compress request, set the variable to the null value, i.e., "let $tutopt = --".)

The traditional tutor display -- where space lines are used liberally to separate parameters -- is still available because (a) many users are accustomed to the old style, (b) much application documentation is committed to the old style, and (c) some installations find the old display more attractive than the compressed display.

Note that you may force a string parameter to fit on one line of a tutor screen (compressed or standard) by declaring the maximum string length to be 24. Thus, the parameter defined by:

	parm x type=(string,24)

fits on one line, whereas the parameter defined by:

	parm x type=string

requires six lines to handle the default maximum length of 132.