OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-13
Reading a File: C Programming Example
384 func_units.zwrite = ZAPS_VAL_FALSE;
385 func_units.zfileaccess = ZAPS_VAL_FALSE;
386 func_units.zfilemgmt = ZAPS_VAL_FALSE;
387 func_units.zfilemgmtenhanced = ZAPS_VAL_FALSE;
388 func_units.zgroup = ZAPS_VAL_TRUE;
389 func_units.zfadulock = ZAPS_VAL_FALSE;
390 func_units.zrecovery = ZAPS_VAL_FALSE;
391 func_units.zrestart = ZAPS_VAL_FALSE;
392
393 /******************************************************************/
394 /* Set up the contents-type-list to request a document of */
395 /* of type FTAM-3 through FTAM_DOC_TYPE. */
396 /******************************************************************/
397
398 contents_type_list.zcount = 1;
399 contents_type_list.zcntnts_type_ispresent = ZAPS_VAL_PRESENT;
400 contents_type_list.zcntnts_type_list[0].zid=ZFTM_VAL_CNTNTSLIST_DOCNAME;
401 contents_type_list.zcntnts_type_list[0].u_zcntntstype.zcntntstype.
402 znum_elements = NUM_ELEM;
403 memcpy ( contents_type_list.zcntnts_type_list[0].u_zcntntstype.
404 zcntntstype.zobj_id, FTAM_DOC_TYPE, NUM_ELEM * sizeof (int) );
405
406 /******************************************************************/
407 /* Set the initiator ID for the association. */
408 /******************************************************************/
409
410 initiator_id.zlen = strlen (INIT_ID);
411 memcpy ( initiator_id.u_zc.zb, INIT_ID, strlen (INIT_ID) );
412
413 /******************************************************************/
414 /* Set the account for the association. */
415 /******************************************************************/
416
417 account.zlen = strlen (ACCOUNT);
418 memcpy ( account.u_zc.zb, ACCOUNT, strlen (ACCOUNT) );
419
420 /******************************************************************/
421 /* Set the filestore password for the association. */
422 /******************************************************************/