File Write - Access Module

Teradata® Tools and Utilities Access Module Programmer Guide

Product
Access Module
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2022-06-21
dita:mapPath
epi1641303181955.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2424
Product Category
Teradata Tools and Utilities

The File Write function writes the provided block of data to a currently open file. The structure of the File Write function follows:

typedef struct _pmiRW
{ 
  char       EyeCatcher[pmiMAX_EC_LEN];/* Struct eyecatcher string */
  pmUInt32   StructLength;             /* Length of this structure */
  void      *FIData;
  pmUInt32   BufferLen;
  char      *Buffer;
} pmiRW_t;

where the following is true:

Parameter Field Description
EyeCatcher input Structure description string, such as pmWriteParms.
StructLength input Total structure length, including the EyeCatcher string.
FIData input Value provided by the Access Module in response to a previous open request call.
BufferLen input Length of the data block to be written.
Buffer input Pointer to the data block to be written.

Return Codes

The following File Write return codes supplement those listed in Typical Interface Return Codes.

Return Code Description
pmrcBadFp An invalid or meaningless value in FIData.
pmrcReadOnly The file indicated via FIData is opened for read operations only.

Usage Notes

Consider the following when specifying the File Write parameters:
  • Requirements – A File Write function is required when the Reqtype field of the pmiCmdBlock_t structure is pmiPIDMOptWrite.