Skip to main content

5. RECEIVE

This operation causes data to be received from the foreign socket. The subprogram will wait until the reception of data is complete.

The calling sequence is as follows:

CALL @READ(cmpcd, bfr, len, time[, offset]);

where

  • cmpcd is the completion code variable associated with the local socket.
  • bfr is the variable into which the data is to be placed, and must be a singly dimensioned array, DECIMAL or BINARY, FIXED or FLOAT.
  • len is the number of bits of data to be received. If len is non-positive, no operation is performed. len has the attribute BINARY FIXED(31,0).
  • time is the length of time the subprogram is to wait for the completion of the operation.
  • offset is the bit offset from the first bit of bfr at which the first bit of data is to be placed, and must have the attributes BINARY FIXED(31,0). If not specified, offset defaults to zero.

The following completion codes are possible for this operation:

CodeDescription
0The operation was successful and the data has been received
4The specified local socket is not a receive socket; the operation was suppressed
8The specified completion code variable is not assigned to a socket; the operation was suppressed
12A previous RECEIVE operation is in progress; the operation was suppressed
16The connection is not fully open; the operation was suppressed
20The foreign socket terminated the connection before completion of the RECEIVE operation; data is unpredictable
36Either hardware at the foreign site is inoperative, or the NCP's counterpart at the foreign site does not exist or has failed
44By operator command, all Network operations were terminated; the socket will be closed
24An addressing or protection exception was encountered with respect to the data buffer; the operation was suppressed
52One or more interrupts were received from the foreign socket; the operation was suppressed
60An NCP control transmission error occurred; the operation was aborted, and the socket will be closed
252The specified time limit was exceeded; the operation was initiated but not completed