Page 1 of 1

Sybase ASE Write Delimiter Issues

Posted: Sun May 30, 2010 7:56 pm
by ktaylor
Hi
I would like to use Sybase Enterprise Parallel Job Stage with Write Method ASE Write to load some data into empty tables with no indexes. I am currently using ASE Upsert instead of ASE Write but it runs at half the speed.

Now I did get ASE Write working until we had some valid data containing | (pipe) and that was when it fell over with "Unexpected EOF encountered in BCP data-file." This issue being that the pipe was being treated as the delimiter.

Unfortunately with the version of Datastage (8.1) that we have there is no option to change the delimiter from pipe. Also we cannot change the data at all.

Any ideas? I've tried double-quoting the data but to no avail.

Thanks
Katy

Re: Sybase ASE Write Delimiter Issues

Posted: Sun May 30, 2010 8:31 pm
by Ultramundane
Hello,

We are currently using 8.1 FP1 of DataStage and using the ASE Write method we can specify a different "Field Delimiter" in the properties-> options.

Is that option missing?

If so, I think you could use a transformer to put in your own delimeter in the data and put the data in column order into a varchar column (if possible). Then send that data to a target command stage which invokes the bcp command.

But, it is probably better to contact your support provider.

Re: Sybase ASE Write Delimiter Issues

Posted: Sun May 30, 2010 8:45 pm
by ktaylor
Ultramundane wrote:Hello,

We are currently using 8.1 FP1 of DataStage and using the ASE Write method we can specify a different "Field Delimiter" in the properties-> options.

Is that option missing?

If so, I think you could use a transformer to put in your own delimeter in the data and put the data in column order into a varchar column (if possible). Then send that data to a target command stage which invokes the bcp command.

But, it is probably better to contact your support provider.
Thanks for your reply.

Yep the option is missing for us.
I did use a transformer stage to remove the pipe from the data and all worked fine but we are not allowed to change the data so that came to nothing.

Re: Sybase ASE Write Delimiter Issues

Posted: Sun May 30, 2010 9:24 pm
by Ultramundane
If you can supply values in column order of the table for all columns, then I think you can use a transformer to put that data out into a varchar column which has a field delimiter that you build into the data.

Pass this data a target command stage and invoke bcp.

I think you can do it as follows:
mknod /tmp/bcppipe.$$ p
cat <&0 | /tmp/bcppipe.$$ &
sleep 1
bcp db.owner.tb in /tmp/bcppipe.$$ -rest of the parameters.
(which is fairly complicated).

Probably best to just output to a sequential file as mentioned using the transformer to one column and then use a source stage to invoke the bcp command with the file that was written out.

Off to bed now.

Good luck