Following is an example of an initialization function of the OptParms parameter for a load job.
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