OSI/AS Programming Manual

Example 2: Presentation Layer and ACSE
Sample Programs
E–40 056783 Tandem Computers Incorporated
CALL OPEN( startup.output_file_name, output );
outline ':=' "$RECEIVE READ error." -> @outptr;
CALL WRITE( output, outline_w, @outptr '-' @outline );
CALL ABEND;
END;
CALL CLOSE( receive );
--
-- Open the OUT file.
--
CALL OPEN( startup.output_file_name, output );
IF <> THEN
BEGIN
CALL MYTERM( startup.output_file_name );
CALL OPEN( startup.output_file_name,output );
outline ':=' "Output file OPEN error." -> @outptr;
CALL WRITE( output, outline_w, @outptr '-' @outline );
CALL ABEND;
END;
--
-- Ask the API to allocate and initialize a reserved
-- extended segment for this process.
--
error := APS_INITIALIZE_( swapvol );
IF ( error <> ZAPS^ERR^OK ) THEN
CALL display_aps_error( error_initialize_proc );
END; -- proc initialize_appl
? PAGE
------------------------------------------------------------
--
-- Main procedure for Example 2, Application 1
--
------------------------------------------------------------
PROC sample_osias_appl_1 MAIN;
BEGIN
--
-- read startup message, open output, and initialize APS.
--
CALL initialize_appl;
--
-- Set the OSI manager process name.
--
api_environment.zend^system^name.zs.zi ':='
[ "$OMGR ", 8*[" "] ];
api_environment.zwaitmode := ZAPS^VAL^WAITED;
--
-- Set the local and remote application names.
--