OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-128
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
856 check_action_diag ();
857
858 event = ZFTM_VAL_EVT_OPEN_CNF;
859 get_event ( &event, src_cepi );
860 error = FTM_OPEN_CNF_ ( src_cepi
861 , (long *) &state_result
862 , (long *) &action_result
863 , (int *) &contents_type
864 , (int *) &diag );
865 check_error ();
866 check_action_diag ();
867 check_state ();
868
869 event = ZFTM_VAL_EVT_ENDGROUP_CNF;
870 get_event ( &event, src_cepi );
871
872 /*******************************************************************/
873 /* Establish the destination-file file-selection and file-open */
874 /* regimes. */
875 /*******************************************************************/
876
877 /*******************************************************************/
878 /* Use the FTM_CREATE_REQ_ and FTM_OPEN_REQ_ procedure calls to */
879 /* create and open the file on the destination system. Send these */
880 /* two requests out as a group. Initialize all necessary */
881 /* parameters for the create and open procedures. */
882 /*******************************************************************/
883
884 /*******************************************************************/
885 /* Initialize parameters for the call to FTM_CREATE_REQ_. */
886 /*******************************************************************/
887
888 /*******************************************************************/
889 /* Set up the initial file attributes for the file to be created. */
890 /*******************************************************************/
891
892 /*Kernel Group */
893 initial_attr.zfilename.zlen = strlen (dst_filename);
894 memcpy (initial_attr.zfilename.u_zc.zb, dst_filename,