JCL INTRODUCTION

Man Page Index


This page shows you how to write and execute jCL (jBASE Command Language) programs. It also discusses how jCL manipulates data in the various buffers and select registers.

Most of the following text assumes that you will be using the functionally superior PQN variant of the jCL language. The PQ and PQN Differences section discusses the differences between the two variants.


CONTENTS


JCL PROGRAM STRUCTURE

A jCL program is stored as a text record in a file.

The first line of a jCL program is usually PQ or PQN, unless you have elected to run the program as a UNIX executable (script), in which case the first line will contain #!usr/jbc/bin/jpq.

Subsequent lines contain jCL statements that can execute other programs, manipulate data in the buffers, control the flow of program execution and so on.

jCL program statements comprise an numeric label (optional), a command and any command arguments.

There are many facilities which enable you to control program flow and to call (and return) or jump to other jCL programs. You can also construct internal or external subroutines.

 

LABELS

Labels appear at the start of a line and are always numeric (1, 330, 1000, etc.). You should always put at least one space between the label and the statement.

 

GROUPING COMMANDS

You can place more than one command on a line by separating each command with a subvalue mark character (x"FC" - entered by typing <ctrl \>). The commands will be executed sequentially, left to right.

Some commands cannot be grouped on the same line because they require one or more dedicated lines in the program. These commands are:

( ), [ ], B, BO, F, F;

FB, F-CLEAR, F-FREE, F-KLOSE, F-OPEN, F-READ

F-UREAD, F-WRITE, GOSUB, H, IBH, IH

MVA, MVD, O, P, RI, RO

RSUB, RTN, U, X, ,

Lines which are a continuation of a T or L command from a previous line are also not suitable for grouping.

The M (Mark) command can be followed by other commands on the same line, but it must be the first command on a line. Commands following the M command, on the same line must be separated by a subvalue mark rather than a space (unlike numeric labels).

 

COMMENT LINES

Command line which start with a "C" or an "*" are treated as comments.

If you include a comment in a multiple command line, anything between the "C" or "*" and a following a subvalue mark (or the end of the line) will be ignored.

A label will remain active if the "C" or "*" is placed after it on the line.

 

EXECUTING JCL PROGRAMS

jCL programs can be executed in several ways:

you can the enter the name of the program from jSHELL,
you can "jump to" another jCL program of the same type by using the ( ) command,
you can "call" another jCL program of the same type, as a subroutine, by using the [ ] command,
you can use a PERFORM, EXECUTE or CHAIN statement from a jBC program, or
you can convert the program to a UNIX executable and call it from any shell. Change the first line to #!usr/jbc/bin/jpq and then use chmod to create an executable file.

Once you start a jCL program, it will remain active until:

Even when the jCL program temporarily passes control to another process such as jED or jBC, it will still remain in control (unless control is passed to a jBC program which then CHAINs or ENTERs another jCL program). Exiting from the called process will return control to the jCL program.

If you do not want to store the main body your jCL program in the MD file, you can create a "pointer" jCL program in the MD. For example, to run a jCL program called DAILY which is held a file called REPORTS, create an MD entry like this:

DAILYYREPORT
001 PQN
002 (REPORTS DAILY)

This will chain to jCL program DAILY in file REPORTS.

Note that the "pointer" program and the "pointed to" program can have the same name.

 

LOGIN JCL PROGRAMS

You can create jCL programs which will be run automatically, each time a user logs in or logs in to a specific account. Simply create a jCL program with the same name as the account or user, and put "jsh -" on the last line of the login script (usually ".profile").

This feature can be used for example, to configure the jSHELL environment, implement a security system, or display an initial menu.

For example, let's assume that all users who login to an account called SALES must be offered an initial menu which is a jBC program called MENU held in a file called PROGS. You would create a jCL program in the MD of the SALES account and call it SALES like this:

SALES
001 PQN
002 HRUN PROGS MENU
003 P

Each time a user logs in to the SALES account, the system will search for a program called SALES in the MD of the account. The jCL program will then run the MENU program from the PROGS file.

 

INTERNAL DATA STORAGE

jCL programs use a series of buffers to store and manipulate data internally. jCL uses these buffers in much the same way as variables in a jBC program.

The four main buffers are classed as "input" and "output", and sub-classed as "primary" and "secondary".

Nine file buffers are provided to allow data to be moved to and from file records, There is also a "fast" file buffer to give you quick access to records.

In addition to the main input/output and file buffers, there is a range of five "select" buffers which are used to manipulate lists (typically record keys).

You will need a thorough understanding of the way in which these buffers work if you want to write (or maintain) anything other than very simple jCL programs.

The four jCL main buffers are:

  1. primary input buffer (PIB)
  2. secondary input buffer (SIB)
  3. primary output buffer (POB)
  4. secondary output buffer (SOB)

Typically, the input buffers are used to receive and manipulate data, and the output buffers are used to issue shell commands to the system.

Most of the time you will use the primary buffers as the active buffers. The secondary buffers (particularly the secondary input buffer) are used by very few jCL commands.

 

PRIMARY INPUT BUFFER

The primary input buffer is a work area. It can be used to collect terminal input or for temporary storage of control parameters.

Individual parameters within the PIB are referenced by preceding the parameter number with a percent sign (for example, %3).

When you start a jCL program, the PIB will contain the jCL program name and any supplied arguments, exactly as they were entered.

When you execute a jCL program from a jBC CHAIN, EXECUTE/PERFORM statement, the PIB will contain the CHAIN, EXECUTE or PERFORM command.

If you execute a jBC program from jCL, you can access the contents of the PIB from jBC with the PROCREAD and PROCWRITE statements. Control returns to the jCL program when the jBC program ends - unless control is passed to a jBC program which then CHAINs or ENTERs another jCL program.

 

SECONDARY INPUT BUFFER

The secondary input buffer has three main roles:

collection of input from the terminal when an IN command is used,
collection of error codes generated from executed programs and jQL queries (see the IF E command), and
collection of spooler hold file numbers in the form Entry # n, where n is the hold file number.

Data in the SIB is overwritten each time you use one of these facilities.

When the primary input buffer is active, you can use the MS command to copy the entire contents of the secondary input buffer to the primary input buffer.

 

PRIMARY OUTPUT BUFFER

The primary output buffer is used to build shell commands which are submitted for processing when the P command is executed. With the exception of other jCL programs and the LOGTO command, you can construct and execute any shell command in this way.

You should always use a jCL transfer function when invoking one jCL program from another.

A carriage return is automatically placed at the end of the command in the POB when it is executed by the P command.

 

SECONDARY OUTPUT BUFFER

The secondary output buffer is used to provide a "stack" of responses to be fed into interactive processes, such as jBC or jED, when they request input.

The SOB becomes active when you use the STON (stack on) command. You can then place data in the SOB before you execute say, a jBC program.

The stacked data is used to respond to INPUT requests, instead of taking input from the keyboard - rather like the DATA statement in a jBC program.

Note that the same internal storage area is used for both the SOB and the jBC DATA statement. If your jCL program is called from a CHAIN, EXECUTE or PERFORM statement in a jBC program, any data placed in the stack by a DATA statement will be used by jCL input statements.

If a jCL program is executed directly from the shell, the SOB will be cleared before the program starts.

Each line of data placed in the SOB using the H command must be terminated by typing a less-than character (<) to represent a carriage return.

Older systems required you to use a line continuation symbol (two less - than characters "<<") if you wanted to put more than 140 characters into the buffer. Although this functionality is still supported, you do not need to use the line continuation symbol in jBASE.

 

ACTIVE INPUT BUFFER

Many commands access the currently active input buffer rather than referring specifically to the primary or secondary areas. These include the A and Ap forms of the A command, and the B, D (without parameter), F, IBH, IH, IP and Sp commands.

When an IN or IBN command is executed, when the SIB will become the active input buffer. The SIB will then remain active until an RI, S (n) or MV %n source command is executed.

Be careful when using these commands. Try to structure your programs in such a way as to minimise the possible confusion between which buffer is currently active. As a minimum, include as many comments as you can.

 

ACTIVE OUTPUT BUFFER

When a jCL program is executed from the shell or you issue a STOFF (Stack Off) command, the POB becomes the active output buffer.

The SOB only becomes active when you use a STON (Stack On) command.

You can refer to the parameters in the active output buffer by using a hash sign (#).

Some operations, such as COPY and EDIT, need two buffers and you will need to switch between the buffers when creating these commands. The Primary buffer holds the command (as it would be entered at the shell prompt) and the secondary buffer holds any further input required by the command. If you fail to specify any required input in the secondary buffer, it will be prompted for at run time

 

BUFFER DATA AND POINTERS

Data in the input and output buffers is held as a series of parameters separated by blanks (PQ) or field marks (PQN).

You can refer directly to a specific parameter by using the parameter's sequence number. For example, you might refer to the 10th parameter as %10.

Alternatively, you can refer to the data in terms of its column (or character) position. For example, you might refer to the 21st column (character) of the primary input buffer as S(21).

Four buffer pointers are used:

In the examples which follow, the buffer pointers are indicated by an up arrow like this a.

Field marks (the parameter separators in PQN-style jCL programs) are indicated by a carat like this ^.

The input buffer pointer points to a position in the active input buffer. You can move the pointer without affecting the data in the buffer by using the S, F and B commands. The S command positions the input buffer pointer to a specific location, while the F and B commands move the pointer forward or backward over the parameters.

Each output buffer has its own pointer. These pointers always indicate the end of the parameter data. If you move the pointer backwards and write data to the new position, the original data at the end of the buffer will be truncated.

The BO command is used to move the primary output buffer pointer back one parameter, or to clear the secondary output buffer.

 

FILE BUFFERS

jCL provides nine file buffers, numbered from 1 to 9. The file buffers are used as the medium for transferring data from and to files - reading and writing.

You should always open file buffers before you use them for reading or writing. They can also be used as temporary data storage areas.

The data held in a file buffer (like a database record) is divided into fields which are separated by field marks. If you refer to a field beyond the last field, the required number of additional fields (with null values) are created.

File buffer references are constructed by specifying an ampersand (&), followed by the file buffer number, a period (.) and then a numeric value (which might be an indirect reference) to define the field number you want.

For example, if file buffer 4 contains:

000 TEST1
001 ABC
002 DEF
003 GHI
004 JKL

&4.2 refers to the second field in file buffer 4 - in this case DEF, and &4.0 refers to the record key of the record in file buffer 4 - in this case TEST1.

The record key will be null until you perform a read operation or until you move data into field 0 of the file buffer.

The FB command provides a special "Fast Buffer" facility. You can use FB to read a record from a file into the fast buffer without having to open the file first. There is only one fast buffer. The fields are referred to as &n, where n is the field number. Any existing data is overwritten each time you use the FB command.

 

SELECT REGISTERS

Select registers are used to hold a list of record keys or other multi-valued fields which have been generated by shell commands that produce lists. These include BSELECT, ESEARCH, FORM-LIST, GET-LIST, QSELECT, SEARCH, SELECT and SSELECT. Having executed one of these commands, you should use the PQ-SELECT and PQ-RESELECT jCL commands to load or reset the select registers.

Five select registers (numbered from 1 to 5) are provided. Each can contain a separate list.

The select registers are accessed to by using an exclamation mark (!) followed by the register number - for example !2. Each time a select register is accessed, the next field is taken from the top of the list.

You cannot manipulate the values in a select register. If you write to a select register, say with the MV command, the whole list will be replaced. If you want to use a value more than once, move it to another buffer for temporary storage.
For example, if the Select Register contains

KEY1^KEY2^KEY3^KEY4^...

The first access will retrieve KEY1, the second KEY2, the third KEY3 and so on.

 

BUFFER REFERENCES

Buffer reference symbols can be used to make direct or indirect references to the input and output buffers and the file buffers. You can only make direct references to the select registers.

Four special symbols are used:

% for the primary input buffer.
# for the active output buffer.
& for a file buffer or the "fast" buffer.
! for a select register.

Referencing the primary input buffer or the active output buffer will not reposition the pointer.

Use the appropriate symbol with a literal value to use direct reference. For example:

% 23 Refers to the 23rd parameter in the primary input buffer.

#4 Refers to the 4th parameter in the current output buffer.

&4.19 Refers to field 19 in file buffer 4.

!3 Refers to the next value in select register 3.

Use a combination of symbols and literal values to create an indirect reference. For example:

% %3 Refers to the %3th parameter in the primary input buffer. If say, %3 contained the value 10, this example would refer to the 10th parameter of the primary input buffer.
&4.%5 Refers to the field in file buffer 4 defined by %5.

Indirect references can only be made to the primary input buffer (%), the active output buffer (#) or a file buffer (&). If the resulting value is non-numeric, a zero is used. In the case of the file buffer (&), you may only use an indirect reference to the parameter, not the file buffer number - for example, &5.%3 is legal, &%3.5 is not.

Direct or indirect buffer references can be used with the following jCL commands:

( ), F-OPEN, IBH, IFN, MVA
[ ], F-READ, IBP, IH, MVD
F;, F-UREAD, IF, IP, RI
F-FREE, FB, IF (multivalued), L, S
F-CLOSE, H, IF (mask), MV, T

 

BRANCHING

Wherever possible, avoid using the obsolete "M"ark command to control branching within the program. Using labels and the GO commands will help to preserve clarity and make program maintenance much easier.

 

GROUPING COMMANDS

You can put more than one jCL command on the same line by using a subvalue mark. For example:

001 PQN
002 10T "Enter file name :",+
003 IBP %1
004 F-O 1 %1
005 T "Cannot open ", %1, "..."\ GO 10
006 T "File ", %1, " opened OK"

In this example, if the file cannot be opened by the F-O command, the line immediately following the command will be executed (see the F-O command for details). If the file is opened, the next but one line will be executed. By grouping an error message and a branch on the "error" line (005), you will avoid the necessity of creating a separate subroutine to handle the error condition.

Note that you cannot use grouping like this where a command relies on a particular line structure - the F-O command for example.

You can use a mark with the ctrl \> but it must be the first jCL command on the line. For example, use:

M \ IBP:%1 \ IF # %1 X

not:

IBP %1 \ M \ IF # %1 X

 

READABILITY

To increase readability and make it easier to edit and debug your jCL program, you can indent lines by using leading blanks.

The incorporation of useful comments, using the C or * commands, will help with the future maintenance of your programs.

 

TIME AND DATE

The following commands provide a simple way of putting the current system time and date into the currently active input buffer:

S21
U147F
T

Puts the current time, in internal format (seconds since midnight), in the current input buffer (in this case, %21).

S10
U147F
D

Puts the current date, in internal format (days since 31 Dec 67), in the current input buffer (in this case, %10).

S8
U147F
T MTS

Puts the current time, in external format (MTS yields hh:mm:ss), in the current input buffer (in this case, %8).

S33
U147F
D D2/

Puts the current date, in external format (D2/ yields dd/mm/yy or mm/dd/yy - depending on your internationalisation settings), in the current input buffer (in this case, %33).

 

VALIDATING DATE AND TIME

You can use pattern matching to input a valid date or time but it does not catch input like 10/32/94 or 25:25:25.

The example below checks for a valid date in D2/ format by converting it. This mechanism works because an invalid date converts to null.

001 PQN
002 10 T "Enter date (mm/dd/yy) :", +
003 IF # %1 XFinished
004 IBP %1
005 MV %2 "
006 IBH%1;D2/;
007 IF # %2 T B,"Oops!"\ GO 10
008 C Date OK

 

LONG STATEMENTS

To help with program clarity, you can construct long statements by using several H commands. Make sure there is a space at the end the first H command or before the second (and subsequent) commands. For example:

001 PQN
002 HGET-LIST listname
003 STON
004 P
005 HSORT filename WITH ...
006 H HEADING "..."
007 P

Older systems required you to use a line continuation symbol (two less- than characters "<<" the buffer. Although this functionality is still supported, you do not need to use the line continuation symbol in jBASE.

 

CONCATENATION

Use an asterisk (*) to concatenate (join) a series of values. For example:

001 PQN
002 MV %2 "string"
003 MV %1 "Text "*%2*" has been concatenated"
004 T %1

will display "Text string has been concatenated".

 

SPOOLER HOLD FILE NUMBERS

If a hold file is generated while a jCL program is executing, the hold file number is returned as an error message number in the secondary input buffer.

Hold file numbers are returned as Entry #n, where "n" is the hold file number, so that you can distinguish them from "real" error message numbers.


JCL COMMANDS

This section begins with a brief summary of the jCL commands, organized by function. Each jCL command is then described, in alphabetical order.

 

INPUT BUFFER COMMANDS

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

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

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 BUFFER 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.

 

JUMP AND BRANCH OPERATIONS

( ) 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 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 called the subroutine.
RTN Returns control from an external jCL program subroutine to the jCL program that called the subroutine.

 

CONDITIONAL OPERATIONS

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

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

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

L Formats output to the printer.
O Outputs a text string to the terminal.
T Produces complex, formatted terminal output and display buffer values.

 

DEBUGGING

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

( ) 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.

 


JCL COMMAND SYNTAX

( )

Terminates the current jCL program and begins execution of (chains to) another jCL program.

Syntax

({DICT} file-name{, data-section-name} {key}) {label}

 

SYNTAX ELEMENTS

DICT specifies the dictionary section of file-name, if required.

file-name is the name of the file that contains the jCL program to be executed. Can be a literal, or a direct or indirect reference to a buffer or select register.

data-section-name specifies an alternative data section of the file. Can be a literal, or a direct or indirect reference to a buffer or select register.

key is the name of the jCL program to be executed. Can be a literal, or a direct or indirect reference to a buffer or select register. If key is not specified, the current parameter in the active input buffer will be used.

label specifies a label in the target jCL program from which to start execution.

 

NOTES

The ( ) command terminates the current jCL program and begins execution of another jCL program, of the same type.

The input buffers, output buffers, and file buffers are all passed to the second program, and all open files stay open.

The ( ) command is often used in the MD to "point" to another jCL program which contains the main body of code. See example 1.

The ( ) command can also be used to divide large jCL programs into smaller units, minimising the search time for labels.

Using the ( ) command (or the [ ] command), will ensure that the contents of all buffers are available to the target program. If this is not a consideration, you can execute another jCL program with the P command (see later).

 

EXAMPLE 1

MENU
001 PQN
002 (JCL MENU2)

Immediately executes another jCL program called MENU2 in the file called JCL.

 

EXAMPLE 2

MENU
001 PQN
002 (JCLFILE)

When the word MENU is entered from the shell, it will be placed in parameter 1 of the primary input buffer - %1. The program will then unconditionally pass control to the MENU program in file JCLFILE.

 

EXAMPLE 3

DOIT
001 PQ
002 IP?
003 (JCL)

This example will prompt for the name of another jCL program and continue execution with the named jCL program in the file called JCL.

 

EXAMPLE 4

MENU
001 PQN
002 (JCL MENU2) 300

Immediately executes another jCL program called MENU2 in the file called JCL. Execution of MENU2 will begin at label 300.[ ]

Calls another jCL program as an external subroutine.

 

SYNTAX

[{DICT} file-name{, data-section-name} {key}] {label}

 

SYNTAX ELEMENTS

DICT specifies the dictionary level of file-name, if required.

file-name is the name of the file that contains the jCL program subroutine. Can be a literal, or a direct or indirect reference to a buffer or select register.

data-section-name specifies an alternative data section of the file (default is the same name as the dictionary). Can be a literal, or a direct or indirect reference to a buffer or select register.

key is the name of the jCL program to be executed. Can be a literal, or a direct or indirect reference to a buffer or select register. If key is not specified, the current parameter in the active input buffer will be used.

label specifies a label in the target jCL program from which to start execution. Use of the label clause makes this command synonymous with the GOSUB command.

 

NOTES

Input buffers, output buffers, and file buffers are all passed through to the called program, and all open files stay open.

External subroutines can call other subroutines. There is no limit to the number of calls that you can make but the jCL programs must be of the same type.

When an RTN is encountered, control is returned to the calling jCL program. If an RTN is not encountered, execution will terminate at the end of the called program.

 

EXAMPLE

001 PQN
002 [SUBS SUB1]
003 ...

Calls the jCL program SUB1 in the SUBS file as an external subroutine.

+

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

 

SYNTAX

+n

SYNTAX ELEMENTS

 

n is the integer to be added.

 

NOTES

If the number of characters in a parameter increases as a result of the + command, the other parameters will be moved to the right.

If a parameter is preceded by a + sign, the sign will be replaced by a zero.

If the buffer pointer is at the end of the buffer, a new parameter will be created.

If the referenced parameter is non-numeric, a zero is used.

 

EXAMPLE 1

Command PIB Before PIB After

+30 AAA^+20^333 AAA^050^333
a a


EXAMPLE 2

Command PIB Before PIB After

+100 BBB^AA^44 BBB^100^44
a a

EXAMPLE 3

Command PIB Before PIB After

+51 ABC^0000^55 ABC^0051^55
a a

-

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

 

SYNTAX

-n

 

SYNTAX ELEMENTS

n is the integer to be subtracted.

 

NOTES

If the number of characters within a parameter decreases with a - command, the result is prefixed with zeros to maintain the same number of characters as the original value.

Parameters within the input buffer can be preceded by a minus sign. If the buffer pointer is at the end of the buffer, a new parameter will be created. If the referenced parameter is non-numeric, a zero is used.

 

EXAMPLE 1

Command PIB Before PIB After

-300 AAA^345^666 AAA^045^666
a a


EXAMPLE 2

Command PIB Before PIB After

-20 AAA^ABC^666 AAA^-20^666


a a

 

EXAMPLE 3

Command PIB Before PIB After

-50 AAA^-50^666 AAA^-100^666
a a

 

EXAMPLE 4

001 PQN
002 OEnter a number+
003 S5
004 IBP
005 +7
006 T %5
007 -3
008 T %5
009 RTN

This example receives input from the terminal and places it in the 5th parameter of the primary input buffer. It adds 7 to the value stored in the 5th parameter and displays the result. It then subtracts 3 from the result and displays the new value.


JCL