OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-114
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
310
311 /*******************************************************************/
312 /* The following sections initialize the various parameters */
313 /* for the FTM_INITIALIZE_REQ_ procedure. */
314 /*******************************************************************/
315
316 /*******************************************************************/
317 /* Set the wait mode for the association to wait and initialize */
318 /* the APLMGR process name. */
319 /*******************************************************************/
320
321 wait_mode = ZAPS_VAL_WAITED;
322 memcpy (&aplmgr_name, manager_name, strlen (manager_name));
323
324 /*******************************************************************/
325 /* Supply the remote and local OSI addresses or common names. This */
326 /* application uses the common name. Set the length fields of the */
327 /* OSI addresses to 0. */
328 /*******************************************************************/
329
330 src_appl.zpsap.zpsel.zlen = 0;
331 src_appl.zpsap.zssel.zlen = 0;
332 src_appl.zpsap.ztsel.zlen = 0;
333 src_appl.zpsap.znsap.zlen = 0;
334 src_appl.zappl_name.zlen = strlen (src_appl_name);
335 memcpy (src_appl.zappl_name.u_zc.zb, src_appl_name,
336 src_appl.zappl_name.zlen);
337
338 dst_appl.zpsap.zpsel.zlen = 0;
339 dst_appl.zpsap.zssel.zlen = 0;
340 dst_appl.zpsap.ztsel.zlen = 0;
341 dst_appl.zpsap.znsap.zlen = 0;
342 dst_appl.zappl_name.zlen = strlen (dst_appl_name);
343 memcpy (dst_appl.zappl_name.u_zc.zb, dst_appl_name,
344 dst_appl.zappl_name.zlen);
345
346 local_appl.zpsap.zpsel.zlen = 0;
347 local_appl.zpsap.zssel.zlen = 0;
348 local_appl.zpsap.ztsel.zlen = 0;