OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-20
Example 1 in C—Updating a Remote File (in Nowait
Mode)
310 /*******************************************************************/
311
312 error = APS_INITIALIZE_ (/* swapvol */);
313 if ( error != ZAPS_ERR_OK )
314 {
315 printf ("Initialization of the FTAM/APS segment failed\n");
316 exit (EXIT_SUCCESS);
317 }
318
319 /******************************************************************/
320 /* The following sections initialize the various parameters */
321 /* for the FTM_INITIALIZE_REQ_ procedure. */
322 /******************************************************************/
323
324 /*******************************************************************/
325 /* Set the processing mode for the association to nowait and */
326 /* initialize the APLMGR process. */
327 /*******************************************************************/
328
329 wait_mode = ZAPS_VAL_NOWAITED;
330 memcpy (&aplmgr_name, manager_name, strlen (manager_name));
331
332 /**********************************************************************/
333 /* Supply the remote and local OSI addresses or common names. This */
334 /* application uses common names. Set the length fields of the */
335 /* OSI addresses to 0. */
336 /**********************************************************************/
337
338 responding_appl.zpsap.zpsel.zlen = 0;
339 responding_appl.zpsap.zssel.zlen = 0;
340 responding_appl.zpsap.ztsel.zlen = 0;
341 responding_appl.zpsap.znsap.zlen = 0;
342 responding_appl.zappl_name.zlen = strlen (responding_appl_name);
343 memcpy (responding_appl.zappl_name.u_zc.zb, responding_appl_name,
344 responding_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;