IBM 5110 User Manual page 125

Apl
Table of Contents

Advertisement

120
Once the operation to be performed is specified to the I/O processor,
the I/O processor assigns a return code to the shared variable. For
example:
8\1~'"
OUTF :1.:1.003 I
I)::::
(SAI...EB) MSG::::()FF
TYP[::::U'
c'V
... > ... ' - - - - - -
The return code is checked by referencing the
o
0
~
shared variable.
The return code is a two-element vector.
1
In the previous example, the return code is 0 0, which indicates that
the operation to be performed is successfully specified to the I/O
processor. See the IBM 5110 APL Reference Manual for a description
o'f all the return codes.
Once the operation to be performed is successfully specified, the
shared variable used to specify the operation is then used to specify
data that is to be written on the data file. That is, each time new data
is assigned to the shared variable, the I/O processor transfers that
data to a data file and assigns a return code to the shared variable.
For example:
() 0
o
0
SV~12t'RECORD
ONE'
BV
SV~12t'RECORD
TWO'
BV
Remember, in this example, the
data file format is unblocked and
unspanned. All of the records in the
data file must have the same shape.
SV
11-------------
Notice that the shared variable
IO STATUS: INVALID OPERATIDN
cannot be referenced more than
INTEI~RUPT
once to check the return code.
SV
A
SV~:l.2t'RECORD
THREE'
X~"BV
X
() 0 ---:--_ _ _ _ __
X
-====-==--===--rhe return code can be assigned to another
()
variable and then checked more than once.

Advertisement

Table of Contents
loading

Table of Contents