Named Pipe with axsmod bteq export to fastload

Tools & Utilities
Enthusiast

Named Pipe with axsmod bteq export to fastload

Hi,

I have been trying to make bteq exported data to be fastloaded using named pipes on windows and cygwin. But fastload is failing and not waiting for the bteq export to populate the pipe. Please find my scripts below.

Fastload:
-----------
.sessions 1;
.logon box/user,pwd;

BEGIN LOADING TRYPIPE
ERRORFILES TRYPIPE1,TRYPIPE2;

SET RECORD VARTEXT ",";
axsmod np_axsmod.dll "fallback_directory='c:\mc'";
DEFINE
JOB_NAME (VARCHAR(100))
,SYSTEM_NAME (VARCHAR(100))
,MAIN_ID (VARCHAR(100))
file=\\Sessionfolder\my.pipe
;
INSERT INTO
TRYPIPE
(
JOB_NAME
,SYSTEM_NAME
,MAIN_ID
)
VALUES(
:JOB_NAME
,:SYSTEM_NAME
,:MAIN_ID
)
;
.END LOADING
.LOGOFF

Bteq Export:
---------------
.logon box/user,pwd;
.EXPORT report file=\\Sessionfolder\my.pipe
.SET separator ','
.SET TITLEDASHES OFF
.SET WIDTH 2000

SELECT JOB_NAME, SYSTEM_NAME, MAIN_ID||','
FROM mytable
ORDER BY 1;

.logoff

Error shown:
---------------
I/O Error on File Open: 34, Text: Could not open the
requested Pipe, "\\Sessionfolder\my.pipe", because:
The filename, directory name, or volume label syntax is
incorrect.

Do we need to have the file path as the one mentioned above for pipes to work with axsmod? or can we have any ordinary name?
I am calling the fastload script first and then calling the bteq hoping that fastload will wait in the stpe of "Starting to send rows to RDBMS". But its not happening. What am I doing wrong? Can any body help with samples of named pipe implementations and axsmod samples?

Thanks in advance.
3 REPLIES
Enthusiast

Re: Named Pipe with axsmod bteq export to fastload

Please read the .EXPORT report file=\\\Sessionfolder\my.pipe as .EXPORT report file=\\ < server name > \Sessionfolder\my.pipe. The editor is truncating < > symbols contents.
Junior Supporter

Re: Named Pipe with axsmod bteq export to fastload

I seem to recall that there are problems with cygwin and named pipes. Some time ago I developed several processes with named pipes that never worked on cygwin but worked like a charm on SuSE...

As a matter of fact, it turns out that named pipes are 'incomplete implementation':

http://cygwin.com/ml/cygwin/2011-01/msg00293.html

HTH.

Cheers.

Carlos.
Enthusiast

Re: Named Pipe with axsmod bteq export to fastload

Thanks Carlos. Now I am trying the same on windows.. But still no result...
Its failing with the same error. If I remove the file server path and give the target file as a local file then fastload is failing with a message box - 'Fastload.exe - An application referenced memory at location......'. Am I doing some syntax mistake or am I missing some thing?