OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
E–72 056783 Tandem Computers Incorporated
 tag := $UDBL( error_attach_proc );
 print_aps( "APPL2: attach" );
 status := APS_ASSOC_ATTACH_( cepi
 , api_environment
 , local_appl
 , tag
 , service_id
 );
 CALL wait_for_aps_completion( error_attach_proc );
 IF ( status <> ZAPS^VAL^STATUS^OK ) THEN
 CALL display_aps_status( error_attach_proc );
 --
 -- At this point, local-appl and acse_local_ae_title
 -- are available through APS_ASSOC_GETPARAM_, but
 -- we can wait for the indication to get them.
 --
 --
 -- Wait for ACSE associate indication.
 --
 CALL wait_for_event( ZAPS^VAL^EVT^CONNECT^IND );
 --
 -- Get and save the parameters of the associate indication.
 --
 error :=
 APS_ASSOC_GETPARAM_( cepi
 , ! conid !
 , local_appl
 , remote_appl
 , ! connect-result !
 , session_rqmnts
 , ! release-result !
 , ! abort-reason !
 , mode
 , pres_context_list
 , pres_context_result_list
 , pres_default_context_name
 , ! pres-default-context-result !
 , acse_appl_context_name
 , acse_local_ae_title
 , acse_remote_ae_title
 , acse_local_invocation_ids
 , acse_remote_invocation_ids
 , ! acse-result-source !
 , ! acse-diagnostic !
 , ! acse-release-reason !
 , ! acse-abort-source !
 );
 IF ( error <> ZAPS^ERR^OK ) THEN
 CALL display_aps_error( error_assoc_getparam_proc );
 --
 -- A real application would check the session-rqmnts,
 -- pres-context-list, and so forth to make sure that










