Preparing an Application Program to Use the API Library

To use the API library, the library and its exported procedure entry points must be declared in the application program. Within the application program, declare the API library as LIBACCESS=BYFUNCTION with FUNCTIONNAME=SPIAPISUPPORT. This example illustrates declaring a library in an ALGOL program:

LIBRARY SPIAPISUPP (LIBACCESS=BYFUNCTION,
                    FUNCTIONNAME="SPIAPISUPPORT.");

The following exported procedures provide entry points into the API library:

These are examples of procedure declarations in an ALGOL program:

PROCEDURE LINK_APPL_PROGRAM(LINKREQUEST);
EBCDIC ARRAY LINKREQUEST[0];
LIBRARY SPIAPISUPP;

PROCEDURE UNLINK_APPL_PROGRAM(LINKREQUEST);
EBCDIC ARRAY LINKREQUEST[0];
LIBRARY SPIAPISUPP;

PROCEDURE SEND_MESSAGE(MESSAGEIN);
EBCDIC ARRAY MESSAGEIN[0];
LIBRARY SPIAPISUPP;

PROCEDURE SEND_STATUS(STATUSIN);
EBCDIC ARRAY STATUSIN[0];
LIBRARY SPIAPISUPP;

For information on declaring an MCP library in other languages, refer to the appropriate MCP language manual.