View previous topic :: View next topic
|
Author |
Message |
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
Hi All,
I am getting sqlcode -206 in the following fetch query:
EXEC SQL
SELECT EMPLOYER_NAME, PRODUCT_ID
INTO :DCLPLCY-EMPLOYER-NAME,:DCLPLCY-PRODUCT-ID
FROM POLICY
WHERE :DCLPLCY-POLICY-NBR = WS-POLICY-NBR
END-EXEC
i checked the reason as - name IS NOT VALID IN THE CONTEXT WHERE IT IS USED
please help me in debugging this. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Hi,
Please verify the column names in the query.
Code: |
WHERE :DCLPLCY-POLICY-NBR = WS-POLICY-NBR |
|
|
Back to top |
|
|
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
In DCLGEN
DCLPLCY-POLICY-NBR is PIC S9(9) USAGE COMP.
and ws-policy-nbr is PIC 9(9).
is it creating any problem? |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Sm,
The reason for -206 is
Quote: |
column-name IS NOT A COLUMN OF AN INSERTED TABLE, UPDATED TABLE, OR ANY TABLE IDENTIFIED IN A FROM CLAUSE
|
so check whether the column name is correct or not.[/quote] |
|
Back to top |
|
|
sm_2009
New User
Joined: 10 May 2009 Posts: 72 Location: bangalore
|
|
|
|
okie, i removed the working storage variable from WHERE clause.
the error is debugged.
Thanks all. |
|
Back to top |
|
|
|