ACC Error Guide
ZCOM Status Codes
ZCOM Status Message Routine
Chapter 360
ZCOM Status Message Routine
The zcomstatus routine returns a character string which gives an
explanation of the status codes. This routine may be called to format
status messages describing the reason for the status returned in a
terminal request.
The format and a typical use of the zcomstatus routine is as follows:
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
char *errmsg, *statmsg, ibuf[100];
int32 ierr, len, rlen, req, rstat;
uint32 mode;
zaddr_type zaddr;
zmhd_type zmhd;
len = 100;
mode = 0; /* zread ‘wait’ option */
if (ierr = zread (&zaddr, mode, &zmhd, ibuf, len, &rlen, rstat))
{
errmsg = zcomerr (ierr);
}
else {
req = zmhd.mrq.mrqstat;
statmsg = zcomstatus (req, rstat);
}
The two parameters of the zcomstatus call are:
req The request code associated with this terminal
operation. This will either be returned with a ‘zread’
call for a type 6 or 14 message, or will be known from
the context for a mode=8 ‘zsend’ or ‘zcntl’ call, or a
‘zport’ call.
rstat The status code returned by the ZCOM system.










