Re: dbload problem
Posted in 1999
Hi
I think I'm gonna try to vi the unload file and search and replace all
occurencies of the forward slash with a dash "-". The forward slash
occures in one of the character fields in the table. What happened was
that our data entry personnel uses the "/" the abbrieviate words, ex.
without becomes w/out. For some unknown reason they sometimes type in the
forward slash "/" at the end of the character field so the unload ends up
looking like this |THE BIG BOY JUMPED OVER THE FOX/|
I didn't want to have to tamper with the unload file because we are
porting data and we would like to have as much consistency as possible.
The replacement of the "/" with a dash "-" shouldn't change the meaning of
any of the data fields (w/out and w-out should still mean the same thing
and so should 06/06/99 be = to 06-06-99).
We don't have perl installed on our system (I've been pushing for it for
about 6 months now but to no avail) so a scripting solution would have to
be nawk or sed. Time is a factor and I'm not proficient in nawk or sed.
If time permits, I'll try using an alternate delimiter. Btw - I tend to
agree with you, I'm not sure that the forward slash escapes the meaning of
the "|" but rather appends to the string much like in esqlc, if this is
indeed so then it would be useless to use an alternate delimiter.
Thanks very much for your assistance
austin
At 03:21 PM 20/08/1999 -0700, Richard Auslander wrote:
>Austin -
>
>You're not going to like this, but I suspect there is no option on dbload
which
>will solve this problem. Here's a possible solution: can you run the unload
>file
>through a Perl script which would escape the forward slashes? Or can you
>modify
>the program which unloaded the data in the first place to escape them? Just
>out of
>curiousity - what kind of fields would terminate with a slash?? As a final
>option,
>try using a delimiter other than pipe (there's an "unload" command "pipe"
>option to
>specify another character). Perhaps a tab delimiter would not be escaped by
>the
>forward slash. By the way, I think the forward slash is *not* an escape,
>but is
>treated by Informix as a string continuation character, though I'm not sure.
>
>Rich
>
>Austin Castro wrote:
>
>> Hi Guys,
>> I have an unload file that I'm trying to load using the dbload
>utility.
>> In the file, there are certain fields in which the last character is a
>> front slash '/'. The delimiter is pipe"|", and this front slash seems to
>> escape the meaning of the pipe and the other of the fields falls out of
>> sequence and the record is not inserted. Is there an option I can pass to
>> the dbload utility to tell it to ignore the front slash. I'm tampering
>> around with the -X option but I'm not really getting anywhere and I don't
>> have indept manuals for dbload. Please help.
>>
>>
>austin
>
>--
>Richard C. Auslander
>Database Manager
>
>AirFlash, Inc.
>1733 Woodside Rd., Suite #110
>Redwood City, CA 94061
>(650) 556-7928
>
>www.airflash.com
>