# jCL STON
Updated: 10/23/2020, 1:48:27 PM
Created: 10/23/2020, 1:48:27 PM
Last Updated By: Mike Street
Read Time: 2 minute(s)
Tags: buffer jcl
This command selects the secondary output buffer as the active output buffer. It takes the general form:
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.
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.
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.
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.
| Command | POB Before | POB After | | ------- | ---------- | --------- | | STON | COPY^SALES^ABC | COPY^SALES^ABC | | H(SALES.HOLD | ^ | ^ | | | | | | | SOB Before | SOB After | | | ---------- | --------- | | | | (SALES.HOLD< | | | ^ | ^ |
Back to jCL.