View previous topic :: View next topic
|
Author |
Message |
learnmf
Active User
Joined: 14 Mar 2005 Posts: 123
|
|
|
|
i have declared two tables and both tables have same column name.
I need to perform search condition on both the table.
Code: |
ex: 01 taba
02 taba- rec occurs 5 times index by a.
05 x pic 99
05 y pic 99
01 tabb
02 tabb- rec occurs 5 times index by b.
05 x pic 99
05 y pic 99 |
Now i want search both the tables.
when
Code: |
search taba-rec
when x(a)='dd'
end-search
search tabb-rec
when x(b)='cc'
end-search |
Is above code cause any problem. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Hi learnmf,
First thing I doubt whether you can define X & Y like this under both TABA & TABB. Also there are some Systactical corrections to be.
also X & Y defined numeric having values DD & CC...Can they ?
What you are exactly looking for...Better you write your whole code...
Quote: |
Is above code cause any problem. |
The best answer to this question will to execute the code, & you'll come to know whether it causes any problem or not.
Regards,
Priyesh. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi learnmf,
I think you use:
when x(a) of taba = 'dd'
when x(b) of tabb = 'cc'
etc.
You must qualify each duplicate dataname w/the table name in each reference.
Check the COB ref manual for the precise syntax. The manuals at this site are organized nicely for easy reference.
P.S. You have the option of using "in" instead of "of". |
|
Back to top |
|
|
|