User`s guide

4: Record Transfer Interface (BSCRTI)
DC 900-1406E 79
4.4 BSCREAD Procedure
This procedure can be called only after the server, ICP, and link number have been
assigned (see Section 4.1 on page 74).
Calling Sequence
ReturnCode = BSCREAD (rdblock, recbuf, recl, lastrec, fixed,
binary, forms, dtime)
Procedures Called
BSCRESET and BSCFWY
Functions
1. If the read block (rdblock) is empty, reads in another read block from the ICP.
Determines if there is a Print or Punch component select sequence at the start of
the first record in the read block and if so, deletes it.
2. Moves one record from the read block (
rdblock) to the user buffer (recbuf).
Deblocks records using record separators or
recl characters, whichever is smaller.
The record separators will not be returned to the caller.
Exceptions:
a. If the read block contains no record separators, it is treated as one record as
long as there are fewer than or equal to
recl characters.
b. If the
binary flag is true, ignores record separator characters and returns
recl characters or entire read block contents, whichever is smaller.
c. If the
fixed flag is true, accumulates data of length (recl) before returning.
3. Sets last record flag (
lastrec) when appropriate.
4. Calls BSCRESET if a fatal error or timeout (
dtime) occurs.