Home » Developer & Programmer » Precompilers, OCI & OCCI » Pro*Cobol - Accept user variables
Pro*Cobol - Accept user variables [message #93982] Mon, 30 June 2003 06:23 Go to next message
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 Go to previous message
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
Previous Topic: free Pro*c Complier
Next Topic: OCCI Compile/Linking Errors - std::basic_string
Goto Forum:
  


Current Time: Wed May 29 20:09:04 CDT 2024