Shutdown - Access Module

Teradata® Tools and Utilities Access Module Programmer Guide

Product
Access Module
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2018-10-10
dita:mapPath
asf1527114222349.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2424
lifecycle
previous
Product Category
Teradata Tools and Utilities

The Shutdown function terminates an Access Module. The structure follows:

typedef struct _pmiShut            
{                                            
  char       EyeCatcher[pmiMAX_EC_LEN];/* Struct eyecatcher string */
  pmUInt32   StructLength;             /* Length of this structure */
  void      *PIData;                                       
  pmUInt16   Mode;                                                   
} pmiShut_t;                

where the following is true:

Parameter Field Description
EyeCatcher input Structure description string, such as pmShutParms.
StructLength input Total structure length, including the EyeCatcher string.
PIData input Value provided by an Access Module in response to a previous open request call.
Mode input Shutdown mode/option as follows:
  • pmShutDownNormal – Normal error checking. If anything prevents a clean termination (such as files still open), then exit without action with a non-pmrcOK in Retcode.
  • pmShutDownBrute – Take arbitrary action for unexpected conditions.

Return Codes

The following Shutdown return code supplements those listed in Typical Interface Return Codes:

Return Code Description
pmrcOpenFiles Files are open.

Usage Notes

Consider the following when specifying the Shutdown parameters:
  • Requirements – A Shutdown function is required when the Reqtype field of the pmiCmdBlock_t structure is pmiPIDMOptShut.
  • Housekeeping Operations – The Shutdown function also performs the following housekeeping operations:
    • Terminating subprocesses
    • Closing open files
    • Freeing memory
  • Error Conditions – The Shutdown function needs to proceed despite file close errors.