JCL STON

Man Page Index


Selects the secondary output buffer as the active output buffer.

 

SYNTAX

STON
ST ON

 

NOTES

The STON command selects the SOB as the active output buffer. With the stack turned on, all data moved to an output buffer with an MV, H or A command will be placed in the secondary output buffer.

The stack is often used to feed responses to interactive processes. It can also be used to store a series of commands that you might need for example when you are dealing with select lists. For example, do a GET-LIST, followed by a SORT-LIST and then run a jBC program.

Typically, you would create the command necessary to start the external job stream in the primary output buffer. Next you would turn the stack on and store all the necessary responses (or commands) to the external process. When you issue the P command to execute the external program, instead of taking it"s input from the terminal, the program will be fed directly from the stack.

Terminated successive responses in the stack, with a less-than-character (<) to represent a RETURN key depression. A single response or the last response in the stack does not require the less than character (<) because a RETURN is generated by the P command.

 

EXAMPLE

Command POB Before POB After
STON COPY^SALES^ABC COPY^SALES^ABC
H(SALES.HOLD          ^          ^
SOB Before SOB After
(SALES.HOLD<
^             ^

JCL