Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: loading EBCDIC with sqlload

Re: loading EBCDIC with sqlload

From: Zoran <zoranm_at_echo-on.net>
Date: 1997/02/28
Message-ID: <3317A109.115F@echo-on.net>#1/1

------------3BB2E815F852
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

Jim Finch wrote:
>
> I am trying to load some EBCDIC data using sqlload. I finally got it  to

> work except for loading packed data. I am getting oracle errors on
> converting the packed fields.
>
> I am also having problems with a WHEN clause. I am comparing columns
 4:8
> with 'BATCH' and never get it to equal eventhough I know there are
> records that match. Do I have to convert 'BATCH' to EBCDIC?
>
> By the way the EBCDIC is on a IBM mainframe and the packed is COMP-3
> Here is the sqlload
>

I assume your target db is not on the mainframe. ie. the target OS is ASCII not EBCDIC.

Firstly, how are you downloading the data file? If your ftp'ing the file, it's probably that ftp is converting your ebcdic source file to an ascii file on your non-mainframe computer. Hence you don't need EBCDIC part in your sqlload.

Secondly, in my experience, you should expand the COMP-3 to numeric before downloading.

As far as the BATCH when clause goes, all I can say is that if this were me doing this, I would expand all packed fields to non-packed, download with ftp (to convert ebcdic to ascii) then use "BATCH" in ascii since your input file on the non-mainframe computer is ascii also.

Have fun...

Zoran.

------------3BB2E815F852
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset=us-ascii

<HTML><BODY>

<DT>Jim Finch wrote:<BR>

&gt;&nbsp;<BR>
&gt; I am trying to load some EBCDIC data using sqlload. I finally got it to<BR>

&gt; work except for loading packed data. I am getting oracle errors on<BR>
&gt; converting the packed fields.<BR>
&gt;&nbsp;<BR>
&gt; I am also having problems with a WHEN clause. I am comparing columns
4:8<BR>
&gt; with 'BATCH' and never get it to equal eventhough I know there are<BR>
&gt; records that match. Do I have to convert 'BATCH' to EBCDIC?<BR>
&gt;&nbsp;<BR>
&gt; By the way the EBCDIC is on a IBM mainframe and the packed is COMP-3<BR>
&gt; Here is the sqlload<BR>
&gt;&nbsp;<BR>

I assume your target db is not on the mainframe. ie. the target OS is ASCII not EBCDIC.</DT>

<DT>&nbsp;</DT>

<DT>Firstly, how are you downloading the data file? If your ftp'ing the
file, it's probably that ftp is converting your ebcdic source file to an ascii file on your non-mainframe computer. Hence you don't need EBCDIC&nbsp;part in your sqlload.</DT>

<DT>&nbsp;</DT>

<DT>Secondly, in my experience, you should expand the COMP-3 to numeric
before downloading.</DT>

<DT>&nbsp;</DT>

<DT>As far as the BATCH when clause goes, all I&nbsp;can say is that if
this were me doing this, I would expand all packed fields to non-packed, download with ftp (to convert ebcdic to ascii) then use &quot;BATCH&quot; in ascii since your input file on the non-mainframe computer is ascii also.</DT>

<DT>&nbsp;</DT>

<DT>Have fun...&nbsp;</DT>

<DT>&nbsp;</DT>

<DT>Zoran.</DT>

</BODY>
</HTML>

------------3BB2E815F852-- Received on Fri Feb 28 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US