8 File Storage

Using message Catalogs

The functions CATOPEN, CATCLOSE and CATGETMSG give application message catalog support. This allows eloquence applications to use HP-UX message catalogs (built using gencat).

Syntax:

CATOPEN "filename"
CATCLOSE
CATGETMSG ["Msg_set",] Msg_num;String_var$
Sample application code:

   DIM Msg$[80]
   CATOPEN "APP.CAT,TEST"
   Msg_set = 1
   Msg_num = 10
   CATGETMSG Msg_set,Msg_num;Msg$
   LDISP "Message = ";Msg$
   CATCLOSE
Msg_set may be omitted in CATGETMSG and will default to 1. If a CATGETMSG is executed with no previous CATOPEN, ERROR 51 (file not open) will be returned.

If a message could not be located, the result variable will contain an empty string.

A message catalog remains open across programs (like COM) and will be reset if program execution stops (e.g. END).


Eloquence Language Manual - 19 DEC 2002