Re: Sql in Cobol worked in oracle 7 but not in 8

From: Chuck McGavern <cmcgav_at_ionet.net>
Date: Thu, 06 Dec 2001 17:04:21 -0600
Message-ID: <c0uv0uoeo6kv4l9kqkfani66tvu6fikibn_at_4ax.com>


In Pro*COBOL v7, PIC X() variables default to VARCHAR2 type In Pro*COBOL v8, PIC X() variables default to CHAR type

Type adding the following line following the definition of p-date

EXEC SQL VAR p-date IS VARCHAR2 END-EXEC.

*OR*

You can change the default behaviour back to VARCHAR2 by changing the Pro*COBOL configuration file: ora_pcc:pcbcfg.cfg.

Add a line PICX=VARCHAR2 to do this.

Good luck!

Chuck

On 17 Oct 2001 08:40:32 -0700, hap_at_mikomi.org (Adam Hapworth) wrote:

>I have a little bit of code from a Cobol program here at work that
>works fgin e in oracle 7 but in the transfer to 8 I am getting an
>error ora-01841. Here is the peice of code that was previoulsy used.
>
>p-date picx(8).
>
>exec sql
> select nvl(:p-date, null)
> into
> :p-date from dual
>end exec.
>
>exec sql
> update p
> set
> status =:p-status,
> date = to_date(:p-date, 'yyyymmdd')
>end sql.
>
>I am not overly proficient in cobol but I beleive the p-date is
>initalized as a space or a blank but not null. I was wondering how I
>could get around this problem. I don't care if the date is null as
>you can see above.
>
>Adam
Received on Fri Dec 07 2001 - 00:04:21 CET

Original text of this message