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 />

C INMOD - UNIX<br />

DROP TABLE ET_TABLE200;<br />

CREATE TABLE TABLE200 (<br />

X1 integer,<br />

x2 char(76)<br />

);<br />

.BEGIN LOAD SESSIONS 4<br />

ERRORTABLE ET_TABLE200;<br />

.LAYOUT TABLE200;<br />

.FIELD x1 1 integer nullif x1 = 5;<br />

.FIELD x2 * char(6) nullif x1 = 4;<br />

.FIELD x3 * char(10) nullif x1 = 4;<br />

.FIELD x4 * char(10) nullif x1 = 4;<br />

.FIELD x5 * char(10) nullif x1 = 4;<br />

.FIELD x6 * char(10) nullif x1 = 4;<br />

.FIELD x7 * char(10) nullif x1 = 4;<br />

.FIELD x8 * char(10) nullif x1 = 4;<br />

.FIELD x9 * char(5) nullif x1 = 4;<br />

.FIELD x10 * char(5) nullif x1 = 4;<br />

.DML LABEL A;<br />

INSERT INTO TABLE200 VALUES<br />

(<br />

:x1<br />

,:x2<br />

);<br />

.IMPORT INMOD <br />

LAYOUT TABLE200<br />

APPLY A FROM 1 THRU 100;<br />

.END LOAD ;<br />

.LOGOFF;<br />

************************************************************************/<br />

#include <br />

#include <br />

#include <br />

typedef unsigned short Int16;<br />

typedef unsigned char Int8;<br />

typedef unsigned long int Int32;<br />

/* PASSING parameter structures<br />

*/<br />

typedef struct {<br />

Int32 code;<br />

Int32 len;<br />

struct {<br />

int seqno;<br />

Int8 body[80];<br />

} buf;<br />

} inmodbuf;<br />

typedef struct {<br />

Int32 seq;<br />

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

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

Saved successfully!

Ooh no, something went wrong!