in reply to Re: stdout and special characters
in thread stdout and special characters

Hi,
Yes Oracle's sqlldr..
I tried setting binmode(FILE) to open data in bin mode but it didn't seem to change the stream data.
Here's the thing..what boggles me is that I can load the data correctly from a dat file into sqlldr, but not through stdout when I stream it like in the example. That's why I think it's a stdout issue and not a sqlldr issue.
My .ctl file looks like this
---------------------
LOAD DATA
INFILE "-" "str '<endrec>\r\n'"
APPEND

INTO TABLE DOC_TMP_TEST
FIELDS TERMINATED BY 'Ø'
TRAILING NULLCOLS
(

document_id,
text VARCHARC(9,100000000)
)

Replies are listed 'Best First'.
Re^3: stdout and special characters
by almut (Canon) on Dec 16, 2008 at 19:19 UTC
    I tried setting binmode(FILE)...

    Have you also set "binmode $sqlldr;"? (Both in- and output must operate in binary mode.)

    As you have a .ctl file, how are you telling sqlldr about it? There's no "control=..." argument in your pipe command in open(), and the reference docs say "default: none".

      Yes I did set binmode on both FILE and $sqlldr. I didn't display the .ctl arguments in the open call. I left many of the arguments out because I felt it was trivial to the problem.