Caché MultiValue PROC Reference
P, PH, PP, PW, PX
Executes a command from the primary output buffer.
PROC command processes a command in the primary output buffer (POB). It transfers the command to the command string for execution, then clears the POB.
In Caché and most emulations, the data stack and the secondary output buffer (SOB) use the same storage area. If the command requires an argument value, P
takes this value from the secondary output buffer (SOB) and defines it as the data stack. When the PROC is executed (as opposed to linked to) it takes the value from the data stack, then clears the SOB and data stack.
can take as a suffix the options P (display buffer contents, do not wait before executing), H (execute, hush output), W (display buffer contents then wait for user input before executing), or X (execute, upon completion exit the PROC), thus forming the PP
, and PX
commands. You can also specify multiple options in any order, such as PXW
commands display the contents of the primary output buffer (POB) and secondary output buffer (SOB) before processing the command from the active output buffer. For the purpose of display, they convert @AM delimiter characters to spaces and remove leading blanks.
displays the contents of the output buffers, but does not wait or prompt for user input. It proceeds immediately to executing the displayed command.
displays the contents of the output buffers, then issues a terminal prompt, requiring the user to specify whether to process the displayed command or quit the PROC. The prompt acts on the first character typed; it does not require an Enter key. The prompt takes the following user-specified values:
"Y" or the Enter key Executes the displayed command, clears both output buffers and continues PROC execution.
"N" or "X" Exits the PROC and clears both output buffers.
"S" Skips (does not execute) the displayed command, clears both output buffers and continues PROC execution.
In UniVerse and UniData, the data stack and the secondary output buffer (SOB) are separate storage areas. When the command requires an argument value, P
takes this value from the secondary output buffer (SOB) and appends it to the existing data stack.
In most emulations, P
strips leading blanks from a command prior to execution.
command execution, the active select list is either retained or deleted, depending on the emulation. In Caché and the UniVerse, PICK, Prime, IN2, PIOPEN, and UniData emulations, the active select list is always retained. In jBASE, D3, R83, and REALITY emulations the active select list is discarded following the execution of a MultiValue Basic program.
In jBASE emulation, the PW
command requires that you type a prompt letter then press the Enter key. (Just pressing the Enter key is the same as typing "Y" and pressing the Enter key.) Other emulations immediately process the prompt letter when you type it.
In Reality emulation, there is no PW
command; the PP
command behaves like the Caché MultiValue PW
In UniVerse emulation, the PW
"N" prompt not only exits the PROC, but issues an abort, returning control to either the ON.ABORT verb or the MV shell command line. In other emulations, a "N" or "X" prompt stops execution but does not abort.