User`s guide
4: Record Transfer Interface (BSCRTI)
DC 900-1406E 91
4.8 ICP Read Block
The ICP Read Block is a data structure used by the BSC File Transfer program to receive
data or control information from the ICP. It is also used for error handling based on the
value of the error status byte of the ICP control header. The entire data structure is
described by the following C typedef (refer to the
BSCTRAN.INC include file):
typedef struct
{
struct /* CONTROL HEADER structure */
{
short link; /* Link number */
char subfc; /* Command code */
char err_status; /* Error status */
short size; /* Data size (in bytes) */
char cu; /* Control Unit (N/A 3780) */
char du; /* Device Unit (N/A 3780) */
} header;
union /* DATA ARRAY */
{
char bytes[MAXTRAN]; /* Access as characters (8 bits) */
short words[]; /* Access as short integers (16 bits) */
long dwords[]; /* Access as long integers (32 bits) */
} data;
} TRANBUF;
MAXTRAN
is defined as 4096.
Caution
The BSCTRAN program uses only one Read Block structure. It is
used to receive data acknowledgments from the ICP during SEND
operations and to receive data from the ICP during RECEIVE
operations. The use of one common Read Block enables
BSCTRAN to handle unexpected responses during either SEND or
RECEIVE. User applications that call BSCWRIT and BSCREAD
and wish to handle unexpected responses should also use a com-
mon Read Block structure. Refer to examples in Section 4.4 on
page 79 and Section 4.7 on page 87.