Pro*Cobol - Accept user variables [message #93982] |
Mon, 30 June 2003 06:23 |
Niamh
Messages: 7 Registered: June 2003
|
Junior Member |
|
|
Hi,
I have a program that takes a value from the user and then uses the value in a cursor in a Select statement.
It goes something like this:
chcode PIC X(2);
ACCEPT :chcode;
Select * from tablename where empno not in
(select empno from tablename2 where code = :chcode)
This is fine though I need a way to take in one or more values for 'chcode' which can then be compared in the select statement.
Any help or comments are appreciated.
NC
|
|
|
Re: Pro*Cobol - Accept user variables [message #93983 is a reply to message #93982] |
Mon, 30 June 2003 11:28 |
kiran
Messages: 503 Registered: July 2000
|
Senior Member |
|
|
Hi,
You can try making 'chcode' as Table with occurs clause , and you can execute the sql statements in a loop
with multiple values of chcode ...another approach would be reading from a file having chcode values ...
Iam just giving you some idea and i haven't tried these
Kiran
|
|
|