Chain - IBM 5100 Basic Reference Manual

Hide thumbs Also See for 5100:
Table of Contents

Advertisement

CHAIN 'dev-address' ,arith-exp
60
CHAIN
The CHAIN statement performs the following sequence:
1.
Ends the program currently being executed
2.
Loads a new program
3.
Begins executing the new program
The syntax of the CHAIN statement is as shown:
CHAI N 'dev-address' ,arith-exp
where:
'dev-address'
is the address of the device containing the next program to be loaded
and executed. Device address can be 'ESO' (built-in tape unit) or 'E40' (auxiliary
tape unit).
arith-exp
is a simple expression or constant.
Upon execution of the CHAIN statement, the expression is evaluated and truncated
to an integer. This integer identifies the file containing the new program on the
device specified. A simple constant can also be used. All open files in the current
program are closed. The program in the file (determined by the expression or con-
stant) on the device specified is then loaded and executed starting with the lowest
statement number.
For example:
0110 CHAIN 'ESO', 14
In this statement, the program in file number 14 on device 'ESO' (built-in tape unit)
is loaded and executed after the current program is terminated.
Note About CHAIN
When used in conjunction with the USE statement, the CHAI N statement allows
variable values to be maintained from one program to the next (see USE
statement).
(
I
"

Advertisement

Table of Contents
loading

Table of Contents