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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cobol like Comp in Oracle

Re: Cobol like Comp in Oracle

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Tue, 24 Dec 2002 01:22:01 GMT
Message-ID: <ZEON9.59127$vb3.2288695@news2.west.cox.net>


"FC" <flavio_at_tin.it> wrote in message
news:4HNN9.26174$R45.1202455_at_news2.tin.it...
>
> "Adam Hapworth" <hap_at_mikomi.org> wrote in message
> news:a6cb04db.0212230534.4584e724_at_posting.google.com...
> > I am working on a conversion of some Cobol transaction formats where
> > the receiver is looking for a string which normally comes from Cobol
> > as an "s9(4) comp". from what I have gathered this compresses the
> > data in half. I am trying to replicate this using PL/SQL. Is there a
> > procedure of some kind that will allow me to compress an Oracle Number
> > or Char to half its size and then place it into a string.
> >
> > Adam
>
>
> The format looks like BCD, each half byte representing a digit, and the
sign
> is coded in a way that I don't remember now.
> I believe the SQL Loader datatype called DECIMAL is what you are looking
> for, but this works only for inbound transfers.
> For outbound transfers you'll have to build your own conversion function.
>
> Bye,
> Flavio
>

BCD would be COMP-3. Received on Mon Dec 23 2002 - 19:22:01 CST

Original text of this message

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