HPlogo MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions (ABORTSESS - FCLOSE)

CATREAD

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable.

Provides access to messages in an application message facility formatted by the GENCAT utility. The CATOPEN intrinsic opens the message catalog.

Syntax



  I16                   I32V      I16V    I16V    U16A
  msglength := CATREAD (catindex, setnum, msgnum, catstatus,
                        CA      I16V
                        buffer, buffersize,
                        CA     CA     CA     CA     CA
                        parm1, parm2, parm3, parm4, parm5,
                        I16V
                        msgdest);

Functional Return


msglength

16-bit signed integer (assigned functional return)

Returns the length of the message (in bytes).

Parameters


catindex

32-bit signed integer by value (required)

Passes the index (returned by the CATOPEN intrinsic) that specifies the message catalog to be used. The message catalog must have been formatted with the GENCAT utility.

setnum

16-bit signed integer by value (required)

Passes the message set number within the catalog (1..255).

msgnum

16-bit signed integer by value (required)

Passes the message number within the message set (0..32,766).

catstatus

16-bit unsigned integer array (required)

Returns two elements; the first element is the error number, the second element is reserved and always returns 0. The possible values of the first element returned are:

ValueMeaning
0Successful
1Invalid catindex specified
2Read failed on catalog file
3Message set not found
4Message number not found
6User buffer overflow
7Write to msgdest file failed
14setnum <= 0 specified
15setnum > 255 specified
16msgnum < 0 specified
17msgnum > 32,766 specified
18buffersize <= 0 specified
19msgdest <= -2 specified
100Internal message facility error

buffer

character array (optional)

Returns the assembled message.

buffersize

16-bit signed integer by value (optional)

Passes the buffer length in bytes if you specify buffer. Passes the length (in bytes) of the message to be written to the destination file if buffer is not specified.

Default = 72 bytes.

parm1-parm5

character arrays (optional)

Passes parameters to be inserted into the message. The parameter must always point to a character string and the character string must be terminated by a binary zero.

msgdest

16-bit signed integer by value (optional)

Passes the file number of the message's destination file (0 or -1 = $STDLIST, >2 = file number of the destination file). If buffer or msgdest are not specified, the message goes to $STDLIST ($STDLIST = 0).

Operation Notes


The combined total size of the buffer and parm1 through parm5 parameters cannot exceed 64,000 bytes.

Related Information


Intrinsics CATCLOSE, CATOPEN, GENMESSAGE, NLAPPEND
Manuals Message Catalogs Programmer's Guide




CATOPEN


CAUSEBREAK