OSI/AS Programming Manual
Example 1: Session Layer
Sample Programs
056783 Tandem Computers Incorporated E–3
--
-- APS procedure identification labels.
--
LITERAL error_assoc_getparam_proc
 , error_attach_proc
 , error_connectreq_proc
 , error_connectrsp_proc
 , error_data_getparam_proc
 , error_datareq_proc
 , error_discard_proc
 , error_event_proc
 , error_initialize_proc
 , error_releasereq_proc
 , 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 = 30000;
LITERAL num_bytes_to_transfer = 100;
--
-- 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;
--
-- 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
--










