OSI/AS Programming Manual

Example 2: Presentation Layer and ACSE
Sample Programs
E–36 056783 Tandem Computers Incorporated
CALL NUMOUT( outptr, integer, 10, 5 );
@outptr := @outptr[5];
END; -- proc local_numout
? PAGE
------------------------------------------------------------
--
-- Display an error message for those APS procedures that
-- return "error".
--
------------------------------------------------------------
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;
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