OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-197
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
1402 !------------------------------------------------------------------!
1403 ! Close the file on the destination system, change the attributes, !
1404 ! and then deselect the file. These three primitives must also !
1405 ! be grouped since the file-transfer service class was negotiated !
1406 ! for the association. !
1407 !------------------------------------------------------------------!
1408
1409 !------------------------------------------------------------------!
1410 ! Set the following parameters so the destination file attributes !
1411 ! match the source file. !
1412 !------------------------------------------------------------------!
1413
1414 change_attr.zattrsarepresent := ZAPS^VAL^PRESENT;
1415
1416 IF ( file_attr.zaccesscntrlattrispresent = ZAPS^VAL^PRESENT ) THEN
1417 BEGIN
1418 change_attr.zaccesscntrlispresent := ZAPS^VAL^PRESENT;
1419 change_attr.zaccesscntrl ':=' file_attr.zaccesscntrlattr
1420 FOR 1 ELEMENTS;
1421 END
1422 ELSE
1423 BEGIN
1424 change_attr.zaccesscntrlispresent := ZAPS^VAL^ABSENT;
1425 END;
1426
1427 !------------------------------------------------------------------!
1428 ! Initialize the threshold for the begin-group request to indicate !
1429 ! that all three services (close, change attributes, and deselect) !
1430 ! must be successful for the group to succeed. !
1431 !------------------------------------------------------------------!
1432
1433 threshold := 3D;
1434 status := FTM_BEGIN_GROUP_REQ_ ( dst_cepi
1435 , threshold );
1436 CALL check_status ( dst_cepi );
1437
1438 status := FTM_CLOSE_REQ_ ( dst_cepi );
1439 CALL check_status ( dst_cepi );
1440