# GETBYT
> [HTML Version](getbyt_sbr.htm)
**xcall GETBYT, channel, buffer, bytes**
GETBYT reads a specified number of bytes from an open input file.
**Parameters**
_channel _([Num](num.htm.md)) \[in\]
is the channel number of the file, which must be open for input.
_buffer _[(BLOB](blob.htm.md)) \[out\]
Receives the data.
_bytes_ ([Num](num.htm.md)) \[in\]
Specifies the number of bytes to read, which must be less than or equal to the size of _buffer_.
**Comments**
Use the EOF() function to test for end of file condition before each call to GETBYT.
You can get a similar effect with INPUT RAW, except that it always reads a number of bytes equal to the size of the specified variable.
Note that [GET](get_sbr.htm.md)[XS](keyword-types.htm.md) performs a similar operation but is somewhat more sophisticated.
**See Also**
• [PUTBYT](putbyt_sbr.htm.md)[XS](keyword-types.htm.md)