OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
E–66 056783 Tandem Computers Incorporated
PROC display_aps_error( error_proc );
INT error_proc; -- i : aps proc label
BEGIN
CASE( error_proc ) OF
BEGIN
error_assoc_getparam_proc ->
outline ':=' "APS_ASSOC_GETPARAM_" -> @outptr;
error_data_getparam_proc ->
outline ':=' "APS_DATA_GETPARAM_" -> @outptr;
error_initialize_proc ->
outline ':=' "APS_INITIALIZE_" -> @outptr;
error_status_proc ->
outline ':=' "APS_STATUS_" -> @outptr;
error_sync_getparam_proc ->
outline ':=' "APS_SYNC_GETPARAM_" -> @outptr;
END; -- case error_proc
outptr ':=' " error: " -> @outptr;
CALL local_numout( error );
CALL WRITE( output, outline_w, @outptr '-' @outline );
--
-- A real application would take appropriate action.
--
CALL DEBUG;
END; -- proc display_aps_error
? PAGE
------------------------------------------------------------
--
-- Display a text message for those APS procedures that
-- return "status".
--
------------------------------------------------------------
PROC display_aps_status( error_proc );
INT error_proc; -- i : aps proc label
BEGIN
--
-- Get error code, etc...
--
error := APS_STATUS_( cepi
, event_code
, device_name
, error_code
, error_subcode
, service_id
, diagnostic_buffer