IDIXGETS - Get data area character field as C string

Format


#include “idixhfmt.h"

#define IDIXGETS(pSrc) \                     
        (IDIXGETS)(pSrc, sizeof(pSrc))       
char *  (IDIXGETS)(char *pSrc, int src_len); 

General description

IDIXGETS() is used to create a NULL-terminated string from a data area character field. For data area fields not in buffered data format, the string is created in the LE HEAP storage and is automatically free'd when the IDIXUFMT exit processing finishes. The caller of IDIXGETS() must not free the storage area returned. For data area fields in buffered data format, the existing buffer address is returned.

It is not possible to update a data area field by modifying the string that is returned by IDIXGETS().

IDIXGETS() is a macro, which calls a function by the same name. The advantage of using the macro is that only a single argument is required.

Returned value

Returns the address of the requested data area field as a NULL-terminated string.

Example


#include “idixhfmt.h"

UFM ufm;
char *psz;
… 
psz = IDIXGETS(ufm.EVENT_TYPE);
If (strlen(psz) >= 6 && memcmp(psz,"Abend ") == 0) {  // Abend event
  … 
}