OSI/FTAM Programming Guide
NonStop FTAM Programming
HP NonStop OSI/FTAM Programming Guide—528612-001
3-27
FTAM-3 Files
•
Extent sizes and number of extents, which determine the size of the file, should be
consistent with the requirements of your application, for instance, large enough to
hold the data you expect to transfer into the file.
The suggestion for record length given above is based on the fact that, in the NonStop
FTAM implementation, each node of an FTAM-2 file contains exactly one string.
To find out how to perform local operations on relative files, see the ENSCRIBE
Programmer’s Guide.
FTAM-3 Files
An FTAM-3 file is an unstructured binary file. It consists of a single file-access data unit
(FADU) that includes the entire file.
Writing FTAM-3 Files
To write an FTAM-3 file, you must first open the file (using FTM_OPEN_REQ_ or
FTM_FILE_OPEN_REQ_) with a process-mode (ZFTM-DDL-PROC-MODE)
parameter
value of replace or extend, or both. You must use a fadu-id (ZFTM-DDL-FADU-ID)
parameter value of first and a fadu-operation parameter value of replace or
extend, or both, on the FTM_WRITE_REQ_ call. A replace fadu-operation
replaces the data in the file with the data sent during the write operation, while an
extend fadu-operation appends the data sent to the end of the file.
Actual data is sent with a series of one or more calls to FTM_DATA_REQ_. In each
FTM_DATA_REQ_ procedure call, the data is sent by way of the data-value
parameter. You can send no more than 16 KB per call. This is because a one-to-one
mapping exists
between P-DATA requests and FTM_DATA_REQ_ procedure calls, and according to
NIST FTAM agreements, P-DATA carrying encoded FTAM PDUs or data elements
cannot exceed 16 KB. The data-value parameter consists of one or more data
elements. Each data element uses a value of ZFTM-VAL-DE-BINARY for the
data-element-header type. The actual data segment is raw binary data, and the initiator
properly encodes this data as ASN.1 octet strings.
You must use a separate data element for each string. String length must be less than
or equal to the maximum-string-length value proposed by the FTM_OPEN_REQ_
or FTM_FILE_OPEN_REQ_ procedure or returned in the contents-type parameter
by the FTM_OPEN_CNF_ or FTM_FILE_OPEN_CNF_ procedure. If the string length
is greater than the proposed maximum-string-length, the initiator returns an error to the
application.
For the structure of the data-value parameter for an FTAM-3 file where the
string-significance parameter has the value ZFTM-VAL-STRINGSIG-NOTSIG,
see Figure 3-4 on page 3-20; for a string-significance parameter value of
ZFTM-VAL-STRINGSIG-FIXED, see Figure 3-5 on page 3-20; for a










