Archives of the TeradataForum
Message Posted: Fri, 11 Oct 2002 @ 14:13:40 GMT
Subj: | | Re: Named Pipe (OLEDB) |
|
From: | | Kyle Prescott |
Although the documentation is not exactly clear for W2K, this is pretty easy to use and powerful.
1) you need to add the axsmod statement to your fastload, mload, tpump, etc.
2) the input file name must have pipe as the path. This triggers the access module to create the pipe file as a virtual file.
3) launch fastload wait until fastload has reached the data aqusition mode (fallback file will appear) and fastload will pause until
input data arrives.
4) run fastexport in separate window. Only thing here is to write to the same pipe file name (no axsmod needed or allowed for
output).
****************************************
* FastLoad Script *
****************************************
BEGIN LOADING my_table
ERRORFILES my_table_E1,
my_table_E2
CHECKPOINT 100000
INDICATORS ;
AXSMOD np_Axsmod "ld= fd=
ff= cfd=
ll=
b=";
DEFINE col_1 (CHAR(12)),
col_2 (CHAR(4)),
col_3 (DATE),
col_4 (BYTEINT)
FILE=\\.\pipe\mypipefilename ;
show;
INSERT INTO my_table ( col_1, col_2, col_3, col_4)
VALUES ( :col_1, :col_2, :col_3, :col_4);
end loading;
quit;
****************************************
* FastExport Script *
****************************************
.BEGIN EXPORT SESSIONS 40 4
TENACITY 5
SLEEP 10;
.EXPORT OUTFILE \\.\pipe\mypipefilename
format fastload
MODE INDICATOR;
select *
from myexporttable;
.end export;
.logoff;
.quit;
|