OSI/FTAM Programming Guide
NonStop FTAM Programming
HP NonStop OSI/FTAM Programming Guide—528612-001
3-32
Initializing the API
•
ZAPSTAL and ZFTMTAL files for data definitions
To access FTAM library files in the C language, include these source files:
•
CEXTDECS file (as $SYSTEM.SYSTEM.CEXTDECS) for FTM, APS, and MFM
procedures
•
ZAPSC and ZFTMC files for data definitions
The ZAPSTAL and ZAPSC files are located in the OSI/AS distribution subvolume,
ZOSIAPS, and the ZFTMTAL and ZFTMC files are located on the FTAM distribution
subvolume, ZOSIFTAM.
If you are programming in C, remember these points:
•
All references to the FTM, MFM, and APS procedures and declarations must be in
uppercase.
•
All C modules that are going to be bound together must use the same version of
the NonStop C compiler, Clib, and LargeC.
Initializing the API
After your application is running, but before it establishes its first FTAM association
across the network, it must call the APS_INITIALIZE_ procedure. This procedure asks
the OSI/AS API to allocate and initialize an extended segment in memory for this
instance of your application—that is, for this particular FTAM application process. The
API manages this segment, using it to maintain the context information for all the
FTAM associations your application establishes.
The API segment exists as long as your application process exists. Call
APS_INITIALIZE_ only once at the beginning of an application. For details on the
APS_INITIALIZE_ procedure, see the OSI/FTAM Programming Reference Manual.
Calling a Procedure
The FTM procedures provide an interface to the NonStop FTAM initiator process. For
reference material on FTM procedures, see the OSI/FTAM Programming Reference
Manual.
The typical sequence of steps required to call a procedure is as follows:
1. Before calling the procedure, you must have:
°
Included the procedure declarations for the FTM, APS, and MFM procedures in
the application.
°
Included the FTM, APS, and MFM data declarations in the application.
°
Defined and assigned values to the variables required for parameters used in
the procedure call. For details on specifying parameter structure fields in your
program, see Using Predefined Data Structures on page 3-33.