ZCOM C I/F Library Routines

ZNAME (3X)

PARAMETERS

zap (Return

ZCOM address.

param)

 

name

ZLU symbolic name to search for. The name

 

may be a maximum of 7 characters long, and

 

must be left-justified and null-terminated.

 

Comparison is case sensitive.

RETURN VALUE Routine zname returns 0 if successful. Otherwise, a non-zeroerror code is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM error codes and their meanings.

EXAMPLE

#include <zcom/zcomsys.h>

#include <zcom/zcomcall.h>

int32 ierr; zaddr_type zaddr;

char name[8]; zsinfo_type sip;

/* zinit() must be called in your program before zname() can be called. */ if (ierr = zinit(&sip)) {

/* error return code */ return(ierr);

}

zaddr.node = 0; /* The local node. */ if (ierr = zname (&zaddr, name)) {

/* error return code */

}

else {

/* good return code */

}

268

Chapter 4