Skip to main content

Hi,

I've got something like this in my .pco file :

EXEC SQL

  SELECT TO_CHAR(CAST(RTRIM(Varchar2_11_char_Column) AS DECIMAL(10,2)), 'S9999999D99') from table INTO :hostvar_x_11

END-EXEC.

I get compiler error COBCH0803 : 000576:PLS-103: Encountered the symbol "(" when expecting one of the following: . ) , @ % defaultsymbol The symbol ")" was substituted for "(" to continue.

It compiles fine with the TO_CHAR and RTRIM but when I add the CAST, it won't compile anymore.

Should this work?

Any ideas anyone?

Thanks

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Hi,

I've got something like this in my .pco file :

EXEC SQL

  SELECT TO_CHAR(CAST(RTRIM(Varchar2_11_char_Column) AS DECIMAL(10,2)), 'S9999999D99') from table INTO :hostvar_x_11

END-EXEC.

I get compiler error COBCH0803 : 000576:PLS-103: Encountered the symbol "(" when expecting one of the following: . ) , @ % defaultsymbol The symbol ")" was substituted for "(" to continue.

It compiles fine with the TO_CHAR and RTRIM but when I add the CAST, it won't compile anymore.

Should this work?

Any ideas anyone?

Thanks

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Hello,

I am not certain this will work, but when people have weird problems with oracle syntax and procobol I usually ask them if they have

common_parser=yes

in their precompiler file. If not I tell them to add it and try again.

Hope this helps :)

Robert



------------------------------
Robert de Mander
CEO
Rocket Forum Shared Account
Sweden
------------------------------

Hello,

I am not certain this will work, but when people have weird problems with oracle syntax and procobol I usually ask them if they have

common_parser=yes

in their precompiler file. If not I tell them to add it and try again.

Hope this helps :)

Robert



------------------------------
Robert de Mander
CEO
Rocket Forum Shared Account
Sweden
------------------------------

Hi Robert,

Your solution seems to have done the trick!

Any explanation why it is compiling now?

Big thanks !

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Hi Robert,

Your solution seems to have done the trick!

Any explanation why it is compiling now?

Big thanks !

Kr,

Stefan



------------------------------
Stefan Thys
ING Bank N V
Brussels BE
------------------------------

Hello Stefan,

great that this trick worked (again :)

As to why, common_parser has something to do with the SQL99 standard, but do not ask me to explain what that contains. I am not the resident oracle guy so I usually say that it tells pro*cobol to be a bit more modern and leave it at that.

Kind regards,

Robert



------------------------------
Robert de Mander
CEO
Rocket Forum Shared Account
Sweden
------------------------------