Transferring Data to the Printer (PRT Operation)
When data (character data only) is assigned to the shared variable, it is printed
and a return code is assigned to the shared variable. A 0 0 return code indicates
the data was printed successfully and a nonzero return code indicates the opera-
tion failed. See Return Codes in this chapter for a description of each return code.
Note: The )OUTSEL OFF command is automatically issued by the system when
doing PRT operations. The )OUTSEL option will return to its previous setting
after the PRT operation has been terminated (PRT termination is discussed next).
CLOSING A DATA FILE OR TERMINATING THE PRINTER OUTPUT
Transferring an empty vector will close the data files or terminate the printer out-
put and a final return code will be issued. A 0 0 return code indicates the file
was closed or printer output was terminated successfully. See Return Codes in
this chapter for a description of each return code. Also, for an IN operation, the
file is closed and a return code is issued if an error occurs due to the device or if
an end-of-file empty vector is returned.
CAUTION
For OUT and ADD operations, if the tape cartridge is removed from the 5100
before a data file is closed, the data in the file will be
unusable.
After a data file has been closed, another data file can be opened by assigning
the information required to open a file to the shared variable. Once the tape and
printer input and output operations are done and the data files are closed or print-
ing is terminated, the variable name being shared should be retracted. How to re-
tract the variable name is discussed next.
RETRACTING THE VARIABLE NAME BEING SHARED
The OSVR function is used to retract a variable name being shared. That is, once
the USVR function has been used successfully, the variable name still exists as
an APL variable, but it cannot be used to transfer data to tape or printer, unless
it is reestablished as a shared variable, The OSVR function is monadic (takes one
argument) and is entered as follows:
where NAME(S) can be the names of up to eight variables. If more than one name
is required, the names must be
in a character matrix with each row representing a
name (see Esrablishing a Shared Variable earlier in this chapter).
The 5100 will respond with a 2 (or a 1 if the left argument for the USVO func-
tion was not a 1 -see Establishing a Variable to be Shared in this chapter) for each
variable name that is successfully retracted and a 0 for each variable name that is
not successfully retracted. Normally, if a variable name cannot be successfully
retracted, it was never properly established as a shared variable.
Note: If the OSVR function is used before a file is closed, the system will auto-
matically close the file.
164
When data (character data only) is assigned to the shared variable, it is printed
and a return code is assigned to the shared variable. A 0 0 return code indicates
the data was printed successfully and a nonzero return code indicates the opera-
tion failed. See Return Codes in this chapter for a description of each return code.
Note: The )OUTSEL OFF command is automatically issued by the system when
doing PRT operations. The )OUTSEL option will return to its previous setting
after the PRT operation has been terminated (PRT termination is discussed next).
CLOSING A DATA FILE OR TERMINATING THE PRINTER OUTPUT
Transferring an empty vector will close the data files or terminate the printer out-
put and a final return code will be issued. A 0 0 return code indicates the file
was closed or printer output was terminated successfully. See Return Codes in
this chapter for a description of each return code. Also, for an IN operation, the
file is closed and a return code is issued if an error occurs due to the device or if
an end-of-file empty vector is returned.
CAUTION
For OUT and ADD operations, if the tape cartridge is removed from the 5100
before a data file is closed, the data in the file will be
unusable.
After a data file has been closed, another data file can be opened by assigning
the information required to open a file to the shared variable. Once the tape and
printer input and output operations are done and the data files are closed or print-
ing is terminated, the variable name being shared should be retracted. How to re-
tract the variable name is discussed next.
RETRACTING THE VARIABLE NAME BEING SHARED
The OSVR function is used to retract a variable name being shared. That is, once
the USVR function has been used successfully, the variable name still exists as
an APL variable, but it cannot be used to transfer data to tape or printer, unless
it is reestablished as a shared variable, The OSVR function is monadic (takes one
argument) and is entered as follows:
where NAME(S) can be the names of up to eight variables. If more than one name
is required, the names must be
in a character matrix with each row representing a
name (see Esrablishing a Shared Variable earlier in this chapter).
The 5100 will respond with a 2 (or a 1 if the left argument for the USVO func-
tion was not a 1 -see Establishing a Variable to be Shared in this chapter) for each
variable name that is successfully retracted and a 0 for each variable name that is
not successfully retracted. Normally, if a variable name cannot be successfully
retracted, it was never properly established as a shared variable.
Note: If the OSVR function is used before a file is closed, the system will auto-
matically close the file.
164