OSI/AS Programming Manual
Example 1: Session Layer
Sample Programs
E–8 056783 Tandem Computers Incorporated
 END; -- case error_proc
 outptr ':=' " status: " -> @outptr;
 CALL local_numout( status );
 outptr ':=' ", event: " -> @outptr;
 CALL local_numout( event_code );
 outptr ':=' ", error:" -> @outptr;
 CALL local_numout( error_code );
 outptr ':=' ", errorSub: " -> @outptr;
 CALL local_numout( error_subcode );
 outptr ':=' ", serviceId: " -> @outptr;
 CALL local_numout( service_id );
 CALL WRITE( output, outline_w, @outptr '-' @outline );
 --
 -- A real application would take appropriate action.
 --
 CALL DEBUG;
END; -- proc display_aps_status
? PAGE
------------------------------------------------------------
--
-- Retrieve user data from the API.
--
------------------------------------------------------------
PROC retrieve_user_data( cepi );
INT cepi; -- i : cepi for data
BEGIN
 --
 -- user_data is large enough to hold all of the data.
 -- Real applications might call this procedure several
 -- times using next_position and more_data.
 --
 start_position := 0D; -- start at the beginning
 error := APS_DATA_GETPARAM_( cepi
 , $UDBL( $LEN( user_data ) )
 , user_data
 , more_data
 , next_position
 , start_position
 );
 IF ( error <> ZAPS^ERR^OK ) AND
 ( error <> ZAPS^ERR^NO^DATA ) THEN
 CALL display_aps_error( error_data_getparam_proc );
END; -- proc retrieve_user_data
? PAGE
------------------------------------------------------------
--










