OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-66
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
388 ! Allocate and initialize a segment used by the FTM and APS !
389 ! procedures. !
390 !--------------------------------------------------------------------!
391
392 error := APS_INITIALIZE_ (! swapvol !);
393 IF ( error <> ZAPS^ERR^OK ) THEN
394 BEGIN
395 tempbuf ':=' "Initialization of the FTAM/APS segment failed"
396 -> @text_ptr;
397 text_len := @text_ptr - @tempbuf;
398 CALL WRITE ( termnum, outbuf, text_len );
399 CALL STOP;
400 END;
401
402 !--------------------------------------------------------------------!
403 ! The following sections initialize the various parameters !
404 ! for the FTM_INITIALIZE_REQ_ procedure. !
405 !--------------------------------------------------------------------!
406
407 !--------------------------------------------------------------------!
408 ! Set the wait mode for the association to nowait and initialize the !
409 ! APLMGR process. !
410 !--------------------------------------------------------------------!
411
412 wait_mode := ZAPS^VAL^NOWAITED;
413 aplmgr_name ':=' manager_name FOR $occurs(manager_name) BYTES;
414
415 !--------------------------------------------------------------------!
416 ! Supply the remote and local OSI addresses or common names. This !
417 ! application uses the common name. Set the length fields of the !
418 ! OSI addresses to 0. !
419 !--------------------------------------------------------------------!
420
421 responding_appl.zpsap.zpsel.zlen := 0;
422 responding_appl.zpsap.zssel.zlen := 0;
423 responding_appl.zpsap.ztsel.zlen := 0;
424 responding_appl.zpsap.znsap.zlen := 0;
425 responding_appl.zappl^name.zlen := $occurs(responding_appl_name);
426 responding_appl.zappl^name.zb ':=' responding_appl_name FOR