OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
056783 Tandem Computers Incorporated E–33
 , error_releasersp_proc
 , error_status_proc
 ;
--
-- A DEFINE to make it easy to print a string--
-- e.g., print_aps( "this is a string" );
--
DEFINE print_aps( x ) =
 outline ':=' x -> @outptr;
 CALL WRITE( output
 , outline_w
 , @outptr '-' @outline
 ) #;
--
-- User data literals
--
LITERAL max_user_data = 1000;
--
-- User data template
--
STRUCT user_data_def(*);
BEGIN
 STRUCT header( zaps^ddl^data^hdr^def );
 STRUCT element( zaps^ddl^data^element^hdr^def );
 STRING value[0:max_user_data-1];
END;
--
-- User data element template
--
STRUCT user_data_element_def(*);
BEGIN
 STRUCT header( zaps^ddl^data^element^hdr^def );
 STRING value[0:-1];
END;
--
-- Output variables
--
STRING .outline[0:131]; -- Output line
INT .outline_w := -- Output line (word)
 @outline '>>' 1;
STRING .outptr; -- Output line ptr
INT output := -1; -- Output file number
--
-- Swap volume for API extended data segment
--
INT .swapvol[0:3] := ["$SYSTEM "];
--
-- APS procedure call variables










