HP-UX SNAplus2 R7 APPC Programmer's Guide

Writing Transaction Programs
APPC Entry Points: HP-UX Systems
2.3.1 APPC Entry Point
An application uses APPC to issue an APPC verb synchronously. SNAplus2 does not return control to the application
until verb processing has nished.
Function Call
void APPC (
void * vcb
);
For compatibility with earlier APPC implementations, SNAplus2 also provides the entry points APPC_C and
APPC_P, which can be used in the same way as APPC.
Supplied Parameters
When the application uses the APPC entry point to issue a verb, it supplies the following parameter:
vcb
Pointer to a Verb Control Block (VCB) that contains the parameters for the verb being issued. The VCB
structure for each verb is described in Chapter 3,
APPC Control Verbs and Chapter 4, APPC Conversation
Verbs. These structures are dened in the APPC header le /usr/include/sna/appc_c.h.
Note
The APPC VCBs contain many parameters marked as reserved; some of these are
used internally by the SNAplus2 software, and others are not used in this version
but may be used in future versions. Your application must not attempt to access any
of these reserved parameters; instead, it must set the entire contents of the VCB to
zero to ensure that all of these parameters are zero, before it sets other parameters
that are used by the verb. This ensures that SNAplus2 will not misinterpret any of
its internally-used parameters, and also that your application will continue to work
with future SNAplus2 versions in which these parameters may be used to provide
new functions.
To set the VCB contents to zero, use memset:
memset(vcb, 0, sizeof(vcb));
Returned Values
The function does not return a value. When the call returns, the application can examine the parameters in the VCB
to determine whether the verb completed successfully.
2.3.2 APPC_Async Entry Point
An application uses APPC_Async to issue an APPC verb asynchronously. SNAplus2 returns control to the
application immediately, with a returned value indicating whether verb processing is still in progress or has
completed. In most cases, verb processing is still in progress when control returns to the application. Later,
SNAplus2 uses an application-supplied callback routine to return the results of the verb processing. In some cases,
verb processing is complete when SNAplus2 returns control to the application, so SNAplus2 does not use the
applications callback routine.
Function Call
unsigned short APPC_Async (
void * vcb,
AP_CALLBACK (*comp_proc),
50