LAPI_Msg_string Subroutine

Purpose

Retrieves the message that is associated with a subroutine return code.

Library

Availability Library (liblapi_r.a)

C Syntax

#include <lapi.h>
 
LAPI_Msg_string(error_code, buf)
int error_code;
void *buf;

FORTRAN Syntax

include 'lapif.h'
 
LAPI_MSG_STRING(error_code, buf, ierror)
INTEGER error_code
CHARACTER buf(LAPI_MAX_ERR_STRING)
INTEGER ierror

Description

Type of call: local queries

Use this subroutine to retrieve the message string that is associated with a LAPI return code. LAPI tries to find the messages of any return codes that come from the AIX® operating system or its communication subsystem.

Parameters

INPUT
error_code
Specifies the return value of a previous LAPI call.
OUTPUT
buf
Specifies the buffer to store the message string.
ierror
Specifies a FORTRAN return code. This is always the last parameter.

C Examples

To get the message string associated with a LAPI return code:
{
      
    char msg_buf[LAPI_MAX_ERR_STRING]; /* constant defined in lapi.h */
    int rc, errc; 
          
    rc = some_LAPI_call();
      
    errc = LAPI_Msg_string(rc, msg_buf);
      
    /* msg_buf now contains the message string for the return code   */
      
}

Return Values

LAPI_SUCCESS
Indicates that the function call completed successfully.
LAPI_ERR_CATALOG_FAIL
Indicates that the message catalog cannot be opened. An English-only string is copied into the user's message buffer (buf).
LAPI_ERR_CODE_UNKNOWN
Indicates that error_code is outside of the range known to LAPI.
LAPI_ERR_RET_PTR_NULL
Indicates that the value of the buf pointer is NULL (in C) or that the value of buf is LAPI_ADDR_NULL (in FORTRAN).

Location

/usr/lib/liblapi_r.a