SECTION 2 -- PROC MANAGEMENT CONCEPTS

A "proc" is a function that may be executed under the Terminal Monitor. There are two types of procs:

A proc is made known to TAE through the existence of a Proc Definition File (PDF). The parameters for a process are defined in the PDF; the program itself is contained in a separate, executable disk file. The PDF for a procedure contains the parameter definitions followed by a sequence of TCL commands. For both processes and procedures, a PDF also contains (or references) the help information for the proc.

The steps for implementing an application proc under TAE are as follows:

  1. Create a PDF for the process or procedure, structured as described in this section.

  2. Create a help file, or append the help information to the end of the PDF. The help file is a text file that provides the information for TUTOR and HELP. Help files are described in Section 2.15.

  3. Review the user interface with the proc's anticipated users; TAE commands may be used to display the proc parameters and help information.

  4. If the proc is a procedure, add and debug the body of the procedure(that is, the TCL "program"). See Section 3 for a description of the TAE Command Language (TCL).

    If the proc is a process, write and debug the program and create an executable program file using the host software development utilities. The "TAE Command Language (TCL) Runtime Services, Volume 1: C" and the "TAE Command Language (TCL) Runtime Services, Volume 2: FORTRAN" describe TAE subroutines that are used by application programs.

  5. If desired, use the MSGBLD utility to create detailed explanations of the proc's error messages. These explanations are accessed by the end-user with the HELP-MESSAGE command.

  6. Place the files from steps 1, 2, 4, and 5 in a proc library accessible to the user. Proc libraries are described in Section 2.13.

  7. Update the appropriate menus (Section 4) to reference the new proc.

Using the Graphical Capabilities of TAE Plus

TAE Plus is designed to exploit the capabilities of graphics workstations by providing a set of tools and application-callable routines (the Window Programming Tools package) that support the development of graphical, point-and-click type user interfaces. These capabilities are available to applications running or not running under the Terminal Monitor.

Graphical applications may be initiated using the same mechanisms as any TAE applications, and initial parameters may be supplied through standard PDFs. See the"TAE Plus Overview" and the "TAE Plus User Interface Developer's Guide" and "TAE Plus Programmer's Manual" for more information.

2.1 STRUCTURE OF A PDF

A PDF is a text file created using one of the host's text editors. PDFs are required for process definition, for procedure definition, and for the definition of global variables ("global" PDFs).

2.1.1 Processes

A process PDF specifies:

The structure of a process PDF is:

PROCESS  EXECUTE=file-spec  HELP=help-location

    variable declarations

END-PROC

help text

A sample process PDF is shown in Figure 2-1.

Figure 2-1

Sample Process PDF


!****   Note that a line beginning with the exclamation character
!****   is considered entirely commentary.
!
!****   Note this is a VMS example.
!
PROCESS EXECUTE=TESTS: IMGCOPY
PARM FROM TYPE=(STRING,30) QUALS=QFROM
               !proc QFROM contains declaration of qualifiers
PARM TO TYPE=(STRING,30)
PARM WINDOW TYPE=INTEGER COUNT=4 DEFAULT=(0,1023,0,1023)
END-PROC

The sections of a process PDF are:

2.1.2 Procedures

A TAE procedure provides the capability to package an often-repeated group of TCL commands and to selectively control the execution of the commands. The PDF for a procedure specifies:

The structure is:


PROCEDURE  HELP=help-location
    variable declarations
BODY
    Procedure body with executable TCL commands.
END-PROC

A sample procedure is shown in Figure 2-2.

Figure 2-2

Sample Procedure PDF


PROCEDURE			!IMGCOPY driver for standard images
PARM FROM TYPE=(STRING,30)	!Source
PARM TO   TYPE=(STRING,30)      !Destination

LOCAL WINDOW TYPE=INTEGER COUNT=4

BODY

IF (FROM="alaska")
     LET WINDOW=(0,2048,0,2048)
ELSE-IF (FROM="hawaii")
    LET WINDOW=(0,256,0,256)
ELSE
    LET WINDOW=(0,512,0,512)
END-IF
IMGCOPY @FROM @TO @WINDOW
END-PROC

The sections of a procedure PDF are: