PQN Proc Commands

This section begins with a brief summary of all PQN Proc commands, organized by function, with links to detailed descriptions of the commands. For details of the commands available in PQ Procs, see Differences between PQ and PQN Proc.

Summary of PQN Proc Commands

Input Buffer Operations

B Moves the buffer pointer back to the previous parameter.

F Moves the buffer pointer forward to the next parameter.

IBH Inserts a text string containing embedded blanks into the active input buffer.

IH Inserts a text string, nulls an existing parameter, or creates a new null parameter in the active input buffer.

RI Clears all or part of primary input buffer, and can clear secondary input buffer.

S Moves the input buffer pointer to a specified parameter or column.

Output Buffer Operations

BO Moves the buffer pointer back one parameter and erases the last parameter if the primary output buffer is active, else clears the entire secondary output buffer.

H Inserts a literal into the active output buffer.

RO Clears both output buffers and selects the primary as active.

STOFF Selects the primary as the active output buffer.

STON Selects the secondary (stack) as the active output buffer.

Data Movement Operations

A Copies a parameter from the active input buffer to the active output buffer.

MS Moves the secondary input buffer contents to the primary input buffer.

MV Copies data between primary input buffer, active output buffer, file buffers and select registers.

MVA Copies the specified source into the destination buffer and stores it as a multivalue.

MVD Deletes data from a multivalued parameter in the destination buffer.

Input/Output Operations

IBN Accepts input from the terminal as a single parameter with all blanks intact and places it in the secondary input buffer.

IBP Accepts input from the terminal as a single parameter with all blanks intact and places it in the specified buffer or the active input buffer.

IN Accepts input from the terminal and places it in the secondary input buffer.

IP Accepts input from the terminal and places it in the specified buffer or the active input buffer.

IT Transfers a tape record to the primary input buffer.

L Formats output to the printer.

O Outputs a text string to the terminal.

T Produces complex, formatted terminal output and displays buffer values.

@SYS{TEM} Function, used in conjunction with H, IBH, IF, IH, MV, or T command, that returns system/database information.

Jump and Branch Operations

[ ] Calls an external Proc subroutine.

G, GO, GOTO Transfers control to the Proc statement with the specified label.

GO B Transfers control backward to the last M (mark) command executed and continues execution from that point.

GO F Transfers control forward to the next M (mark) command and continues execution from that point.

GOSUB Transfers control to the local subroutine with the specified label.

M Marks a location to which a GO F or a GO B command transfers control.

RSUB Terminates execution of the local subroutine and returns control to the statement following the GOSUB that originally called the subroutine.

RTN Returns control from an external Proc subroutine to the Proc that called the subroutine.

U Executes a User Exit from a Proc.

Conditional Operations

IF Allows conditional execution of Proc commands.

IF E Tests for presence of an error condition after processing a TCL command.

IF S Tests for presence or absence of an active select list.

IFN Conditionally executes Proc commands based on numeric comparisons.

File Operations

F-C{LEAR} Clears the specified file buffer.

F-D{ELETE} Deletes an item from a file opened by an F-OPEN command.

F-F{REE} Releases an item lock set by the F-UREAD command.

F-K{LOSE} Closes the specified file buffer.

F-O{PEN} Clears and opens a file buffer to allow reads and writes.

F-R{EAD} Reads an item from a file into a file buffer.

F-U{READ} Reads an item from a file into a file buffer and locks the item.

F-W{RITE} Writes the contents of the specified file buffer to a file.

FB Reads an item into a special 'fast buffer' without first opening the file.

Arithmetic Calculations

+ Adds an integer to the current parameter in the active input buffer.

Subtracts an integer from the current parameter in the active input buffer.

F; Performs arithmetic functions on constants and buffer parameters.

Processing

P Executes the TCL command in the primary output buffer.

Debugging a Proc

C or * Lets you include a comment in a Proc.

D Displays all or part of the active input buffer.

TR Invokes Proc trace, displaying each Proc command as it is executed.

PP Displays command in output buffer and prompts to continue.

Exiting a Proc

( ) Terminates the current Proc and begins execution of another Proc.

X Halts execution of a Proc and returns control to TCL.

Case Sensitivity

If keyword case-insensitivity is selected, these commands and their operators and operand keywords can be in any combination of upper or lower case. Otherwise, they must be in upper case.

Go to top button