Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: loading EBCDIC with sqlload
------------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 columns4: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 >
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>
> <BR>
> I am trying to load some EBCDIC data using sqlload. I finally got
it to<BR>
> work except for loading packed data. I am getting oracle errors on<BR> > converting the packed fields.<BR> > <BR> > I am also having problems with a WHEN clause. I am comparing columns4:8<BR>
> with 'BATCH' and never get it to equal eventhough I know there are<BR> > records that match. Do I have to convert 'BATCH' to EBCDIC?<BR> > <BR> > By the way the EBCDIC is on a IBM mainframe and the packed is COMP-3<BR> > Here is the sqlload<BR> > <BR>
<DT> </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 part
in your sqlload.</DT>
<DT> </DT>
<DT>Secondly, in my experience, you should expand the COMP-3 to numeric
before downloading.</DT>
<DT> </DT>
<DT>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.</DT>
<DT> </DT>
<DT>Have fun... </DT>
<DT> </DT>
<DT>Zoran.</DT>
</BODY>
</HTML>
------------3BB2E815F852--
Received on Fri Feb 28 1997 - 00:00:00 CST