25.09.2015 Views

Teradata Parallel Data Pump

Teradata Parallel Data Pump Reference - Teradata Developer ...

Teradata Parallel Data Pump Reference - Teradata Developer ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix C: INMOD and Notify Exit Routine Examples<br />

Sample Notify Exit Routine<br />

P->Vals.TableStats.szName,<br />

P->Vals.TableStats.dbasename);<br />

if(P->Vals.TableStats.type == 'D')<br />

fprintf(fp,"Rows Deleted : "<br />

"%u \nTable/Macro Name :<br />

" : %s \n",<br />

P->Vals.TableStats.Activity,<br />

P->Vals.TableStats.szName,<br />

P->Vals.TableStats.dbasename);<br />

%s \n<strong>Data</strong>base Name"<br />

break;<br />

case NMEventRunStats :<br />

fprintf(fp, "exit called @ states\n");<br />

fprintf(fp, "import %d \n",<br />

P->Vals.Stats.nImport);<br />

fprintf(fp,<br />

"Total SQL Statements: %u \nRequest Sent: %u \n"<br />

"Records Read: %u \nRecords Skipped: %u \n"<br />

"nUnreadable Records: %u \nRecords Sent: %u \n"<br />

"<strong>Data</strong> Errors : %u \n",<br />

P->Vals.Stats.nSQLstmt,<br />

P->Vals.Stats.nReqSent,<br />

P->Vals.Stats.RecsIn,<br />

P->Vals.Stats.RecsSkipped,<br />

P->Vals.Stats.RecsRejd,<br />

P->Vals.Stats.RecsOut,<br />

P->Vals.Stats.RecsError);<br />

break;<br />

case NMEventDMLError :<br />

fprintf(fp, "exit called @ DML error \n");<br />

fprintf(fp, "import %d \n",<br />

P->Vals.DMLError.nImport);<br />

fprintf(fp,<br />

"Error code: %u \nError text: %s \n"<br />

"Record number: %u \nApply number: %d \n"<br />

"DML number: %d \nStatement number: %d \n"<br />

"Error data length : %u \n"<br />

"feedback : %u \n",<br />

P->Vals.DMLError.ErrorCode,<br />

P->Vals.DMLError.ErrorMsg,<br />

P->Vals.DMLError.nRecord,<br />

P->Vals.DMLError.nApplySeq,<br />

P->Vals.DMLError.nDMLSeq,<br />

P->Vals.DMLError.nSMTSeq,<br />

P->Vals.DMLError.Error<strong>Data</strong>Len,<br />

*(P->Vals.DMLError.feedback));<br />

fprintf(fp, "Error data: ");<br />

for (i=0 ;iVals.DMLError.Error<strong>Data</strong>Len; i++) {<br />

fprintf(fp, "%c", P->Vals.DMLError.Error<strong>Data</strong>[i]);<br />

}<br />

fprintf(fp, "\n");<br />

if (P->Vals.DMLError.ErrorCode == TIDUPROW) {<br />

*(P->Vals.DMLError.feedback) = DEFeedbackNoLogging;<br />

fprintf(fp, "Returning feedback = %u \n",<br />

DEFeedbackNoLogging);<br />

}<br />

break;<br />

default :<br />

fprintf(fp,"\nAn Invalid Event Passed to the Exit Routine\n");<br />

break;<br />

<strong>Teradata</strong> <strong>Parallel</strong> <strong>Data</strong> <strong>Pump</strong> Reference 255

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!