OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-115
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
349 local_appl.zpsap.znsap.zlen = 0;
350 local_appl.zappl_name.zlen = strlen (local_appl_name);
351 memcpy (local_appl.zappl_name.u_zc.zb, local_appl_name,
352 local_appl.zappl_name.zlen);
353
354
355 /*******************************************************************/
356 /* The ae_title and src_ae_title parameters are optional */
357 /* parameters supplied for example only. */
358 /*******************************************************************/
359
360 ae_title.zae_title_type = ZAPS_VAL_AE_TITLE_FORMAT2;
361 ae_title.zae_title_format2.zae_qualifier_ispresent =
362 ZAPS_VAL_PRESENT;
363 ae_title.zae_title_format2.zae_qualifier = ae_qualifier;
364 ae_title.zae_title_format2.zap_title.znum_elements = num_elem;
365 memcpy (ae_title.zae_title_format2.zap_title.zobj_id,
366 ap_title, sizeof (ap_title) );
367
368 src_ae_title.zae_title_type = ZAPS_VAL_AE_TITLE_FORMAT2;
369 src_ae_title.zae_title_format2.zae_qualifier_ispresent =
370 ZAPS_VAL_PRESENT;
371 src_ae_title.zae_title_format2.zae_qualifier = src_ae_qualifier;
372 src_ae_title.zae_title_format2.zap_title.znum_elements = num_elem;
373 memcpy (src_ae_title.zae_title_format2.zap_title.zobj_id,
374 src_ap_title, sizeof (src_ap_title) );
375
376
377 /*******************************************************************/
378 /* Select the functional units required of the source system for */
379 /* moving the file: read, limited file management (required to */
380 /* read files, read file attributes, and delete files), and */
381 /* grouping (required for the file-transfer service class). */
382 /*******************************************************************/
383
384 func_units.zread = ZAPS_VAL_TRUE;
385 func_units.zwrite = ZAPS_VAL_FALSE;
386 func_units.zfileaccess = ZAPS_VAL_FALSE;
387 func_units.zfilemgmt = ZAPS_VAL_TRUE;