HP UX 11i v1 I/O Cards manual 174

Models: UX 11i v1 I/O Cards

1 298
Download 298 pages 31.75 Kb
Page 174
Image 174

 

ZCOM C I/F Library Routines

 

ZCOMLOG (3X)

NOTES

1. The ZMLOG program retrieves the unique message test using the

 

logging program name and message number. By default, the message

 

tests of all log messages are retrieved from the message file

 

default.msg in /opt/acc/msg. If the environment variable “LANG” is

 

defined, the message text is retrieved from the message file

 

$LANG.msg instead. In case it does not exist, the default.msg file is

 

used. This allows support for multiple message file in different

 

languages.

 

2. Before calling this routine, zcomlname(3X) should be called to set up

 

the logging program name for all subsequent log records.

 

3. In a multi-threaded application, zcomlname is to be called only once

 

by any one of the threads. It sets up the logging program name for the

 

subsequent calls to zcomlog for all threads. If it is called again, the

 

new program name is effective for the subsequent log messages.

EXAMPLE

#include

<zcom/zcomsys.h>

#include

<zcom/zcomcall.h>

uint32

error;

int32

msgno;

uint32

desc;

uint32

arg;

char

p1;

int

p2;

error

= 1730;

msgno

= 150; /* Msg text = "This is an error. P1 = %c P2 = %d". */

p1

= ’a’;

p2

= 37;

zcomlog (error, msgno, 2, ZCOM_AT_CHAR, p1, ZCOM_AT_INT, p2);

174

Chapter 4

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