コードのサンプル - Access Module

Teradata® Tools and Utilities Access Moduleリファレンス

Product
Access Module
Release Number
17.10
Published
2021年10月
Language
日本語
Last Update
2021-11-16
dita:mapPath
ja-JP/uur1608578381725.ditamap
dita:ditavalPath
ja-JP/obe1474387269547.ditaval
dita:id
B035-2425
Product Category
Teradata Tools and Utilities

ロード ジョブ用のOptParmsパラメータの初期化設定関数例を次に示します。

PIDMMain(pmiCmdBlock_t*opts, void*optParms)
//Initialization Function
opts.Reqtype = pmiPIDMOptInit;
strcpy (optParms.EyeCatcher, pmiEC_Init_t);   //struct eyecatch string
//Pass initialization string to access module
strcpy (optParms.InitStr, InitStr);
optParms.InitStrL = strlen(optParms.InitStr); //Length of InitStr
optParms.StructLength=sizeof(optParms);       //Total structure length
optParms.InterfaceVerNo=pmiInterfaceVersionD; //Header version number of pmdcomt.h
optParms.InterfaceVerNoD=pmInterfaceVersion;  //Header version number of pmddamt.h
//File Read Function
opts.Reqtype=pmiPIDMOptRead;
strcpy(optParms.EyeCatcher, pmiEC_RW_t);      //Stuct eyecatcher string
//Pointer to a buffer into which the access module is to return the data block
optParms.Buffer=(char*)malloc(1024);
optParms.bufferLen=1024
optParms.StructLength=sizeof(optParms);       //Total structure length