Re: Pro*Cobol - Sever al variables
Date: 30 Jun 2003 06:29:33 -0700
Message-ID: <a1d154f4.0306300529.32401f72_at_posting.google.com>
mcgrathm_at_tcd.ie (Michael) wrote in message news:<96c2e6fc.0306300142.6c5e3357_at_posting.google.com>...
> Hi,
>
> Doing some work on legacy code.
> Need to allow a user input the contents of one or more variables at
> run time.
> Having done that a select statement should populate a cursor taking
> account of the user input values. e.g.
>
> accept ch-userval1 (the user inputs all the values (e.g.
> 01,02,05)
> ....
>
>
> select columns
> into c1
> from table1...table5
> where :c_variable in ('ch-userval1')
>
> where ch-userval1 has all the user inputs in one variable in this
> case (01,02,05)
>
>
>
> It appears the pro cobol compiler does'nt like the in statement.
> Please note that a variable number of user values can be submitted.
>
> Would welcome any comments or help.
>
> Michael
You need to use *dynamic* sql
Sybrand Bakker
Senior Oracle DBA
Received on Mon Jun 30 2003 - 15:29:33 CEST