OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
E–48 056783 Tandem Computers Incorporated
/* */
/* General: */
/* This is an example ACSE/Presentation program. */
/* It illustrates how to call the APS procedures. */
/* Some liberties have been taken in error checking; */
/* real applications would include error checking. */
/* This program calls the APS procedures in wait mode. */
/* */
/* OSI/AS Configuration: */
/* 1) The OSI manager process name is $OMGR. */
/* 2) ENTRY #APPL.APPL1 is defined (this program). */
/* 3) ENTRY #APPL.APPL2 is defined (for EXAPSC2B). */
/* 4) Either session version 1 or session version 2 */
/* can be configured. */
/* */
/* To run: */
/* 1) Be sure to run EXAPSC2B (APPL2) first. (It will */
/* issue an attach and wait for a connect */
/* indication). */
/* 2) Run this application second. */
/* */
/* This program does the following: */
/* 1) Issues an ACSE associate request. */
/* 2) Waits for the ACSE associate confirm. */
/* 3) Issues a P-DATA request plus a P-GIVE-TOKENS */
/* request using basic concatenation. */
/* 4) Waits for a P-DATA indication. */
/* 5) Waits for an ACSE release indication. */
/* 6) Issues an ACSE release response. */
/* */
#include <stdioh> NOLIST
#include <stringh> NOLIST
/* */
/* Source in ZAPSC from the appropriate volume and */
/* subvolume. */
/* */
#include "ZAPSC" NOLIST
/* */
/* APS procedure identification labels. */
/* */
enum { error_assoc_getparam_proc
, error_connectreq_proc
, error_data_getparam_proc
, error_datareq_proc
, error_discard_proc
, error_event_proc
, error_initialize_proc
, error_releasersp_proc
, error_status_proc
} ;
/* */
/* User data literals. */