OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
056783 Tandem Computers Incorporated E–71
CALL WRITE( output, outline_w, @outptr '-' @outline );
CALL ABEND;
END;
--
-- Ask APS 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 2
--
------------------------------------------------------------
PROC sample_osias_appl_2 MAIN;
BEGIN
--
-- Read startup message, open output, and initialize
-- the API.
--
CALL initialize_appl;
--
-- Set the OSI manager process name.
--
api_environment.zend^system^name.zs.zi ':='
[ "$OMGR ", 8*[" "] ];
api_environment.zwaitmode := ZAPS^VAL^NOWAITED;
--
-- Set the local application name.
--
local_appl.zpsap.zpsel.zlen := 0; -- not used
local_appl.zpsap.zssel.zlen := 0; -- not used
local_appl.zpsap.ztsel.zlen := 0; -- not used
local_appl.zpsap.znsap.zlen := 0; -- not used
local_appl.zappl^name.zlen := 5;
local_appl.zappl^name.zs ':=' ["APPL2"];
--
-- Set the mode and service ID for an ACSE association.
--
service_id := ZAPS^VAL^SERVICE^ACSE;
--
-- Issue attach, informing OSI/AS that the application is
-- willing to accept an ACSE associate indication.
--