# jCL Commands

Updated: 10/23/2020, 1:48:27 PM
Created: 10/23/2020, 1:48:27 PM
Last Updated By: Mike Street
Read Time: 6 minute(s)

Tags: debugger proc jcl

# Overview

This section is a brief summary of the jCL  commands, organized by function.

# Input Buffer Commands

Command Description
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, creates a new null parameter, or nulls an existing parameter in the active input buffer.
RI Clears all or part of the primary input buffer, and can be used to clear the secondary input buffer.
S Moves the input buffer pointer to a specified parameter or column.

# Output Buffer Commands

Command Description
BO Moves the active output buffer pointer back one parameter.
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 Commands

Command Description
A Copies a parameter from the active input buffer to the active output buffer.
MS Move 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 Buffer Operations

Command Description
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.

# Jump and Branch Operations

Operator Description
( ) Terminates the current jCL  program and begins execution of (chains to) another jCL program.
[ ] Calls an external jCL  program routine.
G, GO , GOTO Transfers control to the jCL  program statement with the specified label.
GO  B Transfers control backward to the previous M (mark) command and continue execution from that point.
GO  F Transfers control forward to the next M (mark) command and continue 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 called the subroutine.
RTN Returns control from an external jCL  program subroutine to the jCL program that called the subroutine.

# Conditional Operations

Operator Description
IF Allows conditional execution of jCL  program commands.
IF E Tests for presence of an error condition after processing a shell command.
IFN Performs numeric comparisons and allows conditional execution of jCL program commands.

# File Operations

Operator Description
F-CLEAR, F-C Clears the specified file buffer.
F-DELETE, F-D Deletes an record from a file opened by an F-OPEN  command.
F-FREE, F-F Releases an record lock set by the F-UREAD command.
F-KLOSE , F-K Closes the specified file buffer.
F-OPEN , F-O Clears and opens a file buffer to allow reads and writes.
F-READ , F-R Reads a record from a file into a file buffer.
F-UREAD, F-UR Reads a record from a file into a file buffer and locks the record.
F-WRITE , F-W Writes the contents of the specified file buffer to a file.
FB Reads an record into a special "fast buffer" without first opening the file.

# Arithmetic Operators

Operator Description
+ 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

Command Descritption
P Executes the shell command in the primary output buffer.
PU Executes the UNIX command in the primary output buffer, using the UNIX shell.

# Terminal and Printer Output

Command Description
L Formats output to the printer.
O Outputs a text string to the terminal.
T Produces complex, formatted terminal output and display buffer values.
D Output from current input buffer

# Debugging

Command Description
C or * Includes a comment in a jCL  program.
D Displays all or part of the active input buffer.
DEBUG Turns debug on or off.
TR Invokes a trace for a jCL  program and displays each command on the terminal before it is executed.
PP Displays the command in the output buffer and prompts to continue.
PW Displays the command in the output buffer and prompts to continue.

# Exiting

Command Description
( ) Terminates the current jCL  program and begins execution of another jCL program.
X Halts execution of a jCL  program and returns control to the shell.

Back to jCL.