PROC Processor Overview

PROC, short for procedure, allows executing a series of TCL and other commands from a single word command. Everything that can be done in TCL can be done in PROC. Procs also are used to avoid repetitively typing the same series of commands, interact with the user, and to test or verify input information from the user.

PROC has the following features:

Use of the PROC processor is much the same as using a JCL on mainframe systems. However, PROC language is more versatile since it can interactively prompt the user for responses and can branch on conditional statements. In addition, Proc can verify the user’s input.

A Proc is a series of instructions that are interpreted by the PROC system processor.

Procs are executed interpretively by the PROC processor; they do not need to be compiled. Procs are stored as dictionary items, or as items in a data file. Procs that are in the current master dictionary can be executed by typing the name at the TCL prompt. While the Proc definition must be in the master dictionary, the actual body of the Proc may reside as an item in any dictionary or data file. Attribute 1 of a Proc is always the pq code.

Once a Proc is invoked, it remains in control until it completes or until it is explicitly terminated. A Proc can temporarily relinquish control to another processor, such as a subroutine or the Update Processor, but it regains control when that process ends. The system only returns to TCL when the Proc is deliberately terminated or when the Proc ends.

D3 allows a sequence of commands to be prestored in a Proc and then started by a single word. Any sequence of operations that can be executed at TCL can be prestored by the PROC processor. This prestored sequence of operations is executed (interpreted) by the PROC processor.

Additional introductory information is presented in these topics:

Linkages

Describes linkages, which are the means by which Procs either pass control one way to another Proc, or call another Proc as an external subroutine.

Logon Procs and Macros

Describes logon Procs (or macros), which execute automatically at log on.

pq Dictionary Code

Describes the pq dictionary code, which is required as the first line of every Proc.

PROC Buffers

Describes the use of PROC buffers.