The following four examples, using an APL shared variable named EXAMPLE,
show how the information required to open a data file or specify printer output
can be entered:
is to be used.
The value TEST2 will be placed
tt
File 3 on tape unit 1 (assumed) is to be opened.
t The value TEST will be compared
I
to the file header field.
File 1 on tape unit 1 is to be opened.
-Data is to be
transferred from tape
into the active workspace.
tFile 3 on tape unit 1 (assumed) is to be opened.
IData is to be transferred into an existing file on tape.
Note: Since the file ID was not specified, no value is compared to the file
header field.
EXAMPI..,E+. ‘ PR‘r MSG::-C)I”’t: ’
tNo error messages will be displayed
for nonzero return codes.
L Data is to be printed.
After the information has been entered, a code (2-element vector) that indicates
whether the operation was successful or not is assigned to the shared variable. A
return code of 0 0 indicates the operation was successful, and a nonzero return
code indicates that the operation failed. See Return Codes in this chapter for a
description of each return code.
1 62
show how the information required to open a data file or specify printer output
can be entered:
is to be used.
The value TEST2 will be placed
tt
File 3 on tape unit 1 (assumed) is to be opened.
t The value TEST will be compared
I
to the file header field.
File 1 on tape unit 1 is to be opened.
-Data is to be
transferred from tape
into the active workspace.
tFile 3 on tape unit 1 (assumed) is to be opened.
IData is to be transferred into an existing file on tape.
Note: Since the file ID was not specified, no value is compared to the file
header field.
EXAMPI..,E+. ‘ PR‘r MSG::-C)I”’t: ’
tNo error messages will be displayed
for nonzero return codes.
L Data is to be printed.
After the information has been entered, a code (2-element vector) that indicates
whether the operation was successful or not is assigned to the shared variable. A
return code of 0 0 indicates the operation was successful, and a nonzero return
code indicates that the operation failed. See Return Codes in this chapter for a
description of each return code.
1 62