OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-18
Reading a File: C Programming Example
579 requested_access.zread = ZAPS_VAL_TRUE;
580 requested_access.zinsert = ZAPS_VAL_FALSE;
581 requested_access.zreplace = ZAPS_VAL_FALSE;
582 requested_access.zextend = ZAPS_VAL_FALSE;
583 requested_access.zerase = ZAPS_VAL_FALSE;
584 requested_access.zreadattr = ZAPS_VAL_FALSE;
585 requested_access.zchngattr = ZAPS_VAL_FALSE;
586 requested_access.zdelete = ZAPS_VAL_FALSE;
587
588 /******************************************************************/
589 /* Initialize the parameters for the FTM_OPEN_REQ_ call. */
590 /******************************************************************/
591
592 process_mode.zread = ZAPS_VAL_TRUE;
593 process_mode.zinsert = ZAPS_VAL_FALSE;
594 process_mode.zreplace = ZAPS_VAL_FALSE;
595 process_mode.zextend = ZAPS_VAL_FALSE;
596 process_mode.zerase = ZAPS_VAL_FALSE;
597
598 /******************************************************************/
599 /* Initialize the threshold for the begin-group request to */
600 /* indicate that both the services (select, and open) must be */
601 /* successful for the group to succeed. */
602 /******************************************************************/
603
604 threshold = 2;
605
606 status = FTM_BEGIN_GROUP_REQ_ ( cepi, threshold );
607 if ( status != ZAPS_VAL_STATUS_OK )
608 {
609 printf ( "FTM_BEGIN_GROUP_REQ_ FAILED\n" );
610 check_status ();
611 }
612
613 status = FTM_SELECT_REQ_ ( cepi
614 , (int *) &remote_file
615 , (int *) &requested_access
616 , /* access_password */
617 , (int *) &account );