File Close - Access Module

Teradata® Tools and Utilities Access Module Programmer Guide

Access Module
Release Number
June 2022
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

The File Close function closes a file that is currently open for read or write operations.

The term file refers to a data source or destination on any sort of data storage device (such as magnetic tape, disk, CD-ROM, or another database) that an Access Module supports. The terms read and write refer to data moving from (read) and to (write) the data source or destination. The structure follows:

typedef struct _pmiClose                                             
  char       EyeCatcher[pmiMAX_EC_LEN];/* Struct eyecatcher string */
  pmUInt32   StructLength;             /* Length of this structure */
  void       *FIData;
} pmiClose_t;

where the following is true:

Parameter Field Description
EyeCatcher input Structure description string, such as pmCloseParms.
StructLength input Total structure length, including the EyeCatcher string.
FIData input Value provided by the Access Module in response to a previous file open request call.

Return Codes

The following File Close return code supplements those listed in Typical Interface Return Codes.

Return Code Description
pmrcBadFp Invalid or meaningless value in FIData.

Usage Notes

Consider the following when specifying File Close parameters:
  • Requirements – A File Close function is required when the Reqtype field of the pmiCmdBlock_t structure is either:
    • pmiPIDMOptClose
    • pmiPIDMOptCloseR
  • Removing and Releasing Media – If Reqtype is pmiPIDMOptCloseR, then an Access Module must also release and remove any associated removable media, such as dismounting a tape from a drive.