Calling the Api Through a C or C++ Program - Documentation for Bmc Ami Defender for Z/Os 6.1
This Topic Discusses How to Call the Api Using a C or C++ Program. Environmentto Call the Api, the Calling Program Must Be: Language Environment Amode...
This topic discusses how to call the API using a C or C++ program.
Environment
To call the API, the calling program must be:
- Language Environment AMODE 31
- Enabled for interrupts
- Not holding any locks
- In primary ASC mode (can also be in cross-memory mode)
- The event record and API1 control block must reside in the calling program’s primary address space (PAS)
These are normal conditions for a C or C++ program. The calling program must also be APF-authorized.
To compile and bind a C program with APF authorization, use the following example:
c89 –Wl,AC=1,EXTATTR=APF –o Sample Sample.c
Must Read
Format
#include “CZAPI1.h”
int CZAPI1(const void *record, const struct CZAPI1CB *ctl_block)