RDTAPE RDTAPE Use the RDTAPE macro instruction to read a record from the specified
tape drive. The format of the RDTAPE macro instruction is:
r---------------- ------------------------, , (label] , RDTAPE buffer,length [,device] , , , [ , ERROR;erradr] I L __ _
label bu ffer
length
device
is an optional statement label.
specifies the buffer address into which the record is to be
read. It may be specified in either of two ways:
the symbolic address of the buffer. lineaddr
(reg) a register containing the address of the buffer.
specifies the length of the largest record to be read. A 65,535-byte record is the largest record that can be read. It may be specified in either of two ways:
n (reg) a self-defining term indicating the length.
a register containing the length.
specifies the device from which the line is to be
omitted, TAPl (virtual address 181) is assumed.
specified in either of two vays:
read. If
It may be TAPn indicates the symbolic tape number (TAP1 through TAP4) cuu indicates the virtual device address. specifies the number of tracks, density, and tape recording
technique options. It must be in the following form:
([ track ],[ density], [trtch])
ER RDR=er ra ddr
track 1 indicates a 1-track tape (implies density;800 and trtch;O) density
trtch
9 indicates a 9-track tape (implies density;800). 200, 556, or 800 for a 7-track tape. 800, 1600, or 6250 for a 9-track tape.
indica tes the
1-track tape.
specified:
tape recording technique for
One of the following must be
o -odd parity, converter off, translator off.
DC -odd parity, converter on, translator off. OT - odd parity, converter off, translator on.
E -even parity, converter off, translator off.
ET -even parity, converter off, translator on.
specifies the address of an error routine to be given control
if an error is found. If ERROR= is not coded and an error
occurs, control returns to the next sequential instruction in
the calling program, as it does if no error occurs. 334 Command and Reference
RDTAPE, RDTERM Macros
1. When the macro completes, register 0 contains the number of bytes
read.
2. You need not specify the Mode option when you are reading from a
Q-track tape and using the default density of the tape drive nor
when you are reading from a 7-track tape a density of 800 bpi,
odd parity, with the data converter and translator off.
If an error occurs, register 15 contains one of the following error
codes:
Code --,- 2
3
4
5 A Invalid function or parameter list
End of file or end of tape Permanent I/O error
Invalid device address
Tape not attached
Incorrect length error
RDTERM Use the macro instruction to read a line from the terminal into
anI/O buffer. The format of the RDTERM macro instruction is: r------ , , I r , I I (label] I RDTERM buffer(,EDIT=code]( I , I NO " I I L .\I , L- _______ _
__ _______________________________________________ --J label
buffer
is an optional statement label.
specifies the address of a buffer into which the line is to be
read. The buffer is assumed to be 130 bytes long, unless EDIT=PHYS is specified. The address may be specified as:
lineaddr
(reg)
the symbolic address of the buffer.
a register containing the address of the buffer.
EDIT=code specifies the type of editing, if any, to be performed on the
input line. NO indicates that a logical line is to be read and no
editing is to be done. PAD requests that the input line be padded with blanks
to the length specified. UPCASE requests that the line be translated to uppercase.
indicates both padding and translation to uppercase. YES is the default.
section 6. CMS Macro Instructions 335
Previous Page Next Page