For Programmers: Free Programming Magazines  


Home > Archive > Cobol > September 2006 > comp -3 usage in linux









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author comp -3 usage in linux
Bala

2006-09-05, 3:55 am

Sir

I am Using a Red Hat Linux Advanced Server release 2.1AS/i686 version
of linux.

In Pro cobol when i use comp-3 for a decimal variable the insertion
happening into the database (Oracle) also happens in a compressed
format.Is there any way to make the insertion happen in normal format.

When i retrieve from the database thru another cobol program using
comp-3 variable the back conversion of the compressed format is not
happening properly and therefore if i try to insert it again the
program results in an oracle excepton 1413.

What are all the parameters of the OS to be checked if the same program
is working on one linux box but not in the other?

Richard

2006-09-05, 3:55 am


Bala wrote:
> Sir
>
> I am Using a Red Hat Linux Advanced Server release 2.1AS/i686 version
> of linux.
>
> In Pro cobol when i use comp-3 for a decimal variable the insertion
> happening into the database (Oracle) also happens in a compressed
> format.Is there any way to make the insertion happen in normal format.
>
> When i retrieve from the database thru another cobol program using
> comp-3 variable the back conversion of the compressed format is not
> happening properly and therefore if i try to insert it again the
> program results in an oracle excepton 1413.
>
> What are all the parameters of the OS to be checked if the same program
> is working on one linux box but not in the other?


Are you declaring your host variables in a BEGIN DECLARE SECTION .. END
DECLARE SECTION ? If not then I suggest that you do this.

Frederico Fonseca

2006-09-05, 3:55 am

On 4 Sep 2006 22:32:30 -0700, "Bala" <balaji.a@3i-infotech.com> wrote:

>Sir
>
> I am Using a Red Hat Linux Advanced Server release 2.1AS/i686 version
>of linux.
>
> In Pro cobol when i use comp-3 for a decimal variable the insertion
>happening into the database (Oracle) also happens in a compressed
>format.Is there any way to make the insertion happen in normal format.
>
>When i retrieve from the database thru another cobol program using
>comp-3 variable the back conversion of the compressed format is not
>happening properly and therefore if i try to insert it again the
>program results in an oracle excepton 1413.
>
>What are all the parameters of the OS to be checked if the same program
>is working on one linux box but not in the other?

PRO*COBOL Version
ORACLE Version
COBOL Compiler used and version.

Compile options.

And if possible a small program cut down to only what is needed to
reproduce the problem would be nice.



Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
Michael Mattias

2006-09-05, 7:55 am

9/5/06
[color=darkred]

If the "other cobol program" was not created with the same compiler, the
data format could be different because "COMP-3" is "Implementor-defined"
meaning not all compilers will use the same format. (e.g., some might use
BCD, others binary integers).

As far as not creating either BCD or binary integer, I would think if your
:WS-COLUMN var (what you are SELECTing INTO) column were defined as USAGE
DISPLAY that should eliminate the problem.

--
Michael Mattias
Tal Systems, Inc.
Racine WI
mmattias@talsystems.com


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com