HFZXGETS - Get data area character field as C string


#include “hfzxhfmt.h"

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

General description

HFZXGETS() 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 HFZXUFMT exit processing finishes. The caller of HFZXGETS() 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 HFZXGETS().

HFZXGETS() 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.


#include “hfzxhfmt.h"

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