ZCOM C I/F Library Routines

 

ZOPEN (3X)

 

RETURN VALUE

Routine zopen 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.

NOTES

The first zopen call that a program makes will define the primary ZLU

 

irrespective of the value of pflag. If a subsequent zopen call is made with

 

pflag=1, the primary ZLU definition will be overridden. If multiple zopen

 

calls are made with pflag=1, then each call will override the previous

 

definition, leaving the primary ZLU defined as the one allocated in the

 

last zopen call. It is a good practice to define the primary ZLU in the first

 

call to zopen and not to redefine it unless the application program has a

 

good reason for doing so.

 

In a multi-threaded application, the primary ZLU is shared globally. If a

 

thread opens a primary ZLU, it is effective for all threads.

 

Routine zopen can only allocate a program input ZLU within the local

 

node. The zaddr parameter in the call is a return parameter only and

 

contains the number of the local node as well as the ZLU and checksum.

EXAMPLE

#include

<zcom/zcomsys.h>

 

#include

<zcom/zcomcall.h>

 

int32

ierr;

 

zaddr_type

zaddr;

 

uint32

pflag;

 

char

name[8];

 

uint32

limit;

if (ierr = zopen (&zaddr, pflag, name, limit)) { /* error return code */

}

else {

/* good return code */

}

250

Chapter 4

Page 250
Image 250
HP UX 11i v1 I/O Cards manual 250