Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Error code -206 while fetching record from table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
View previous topic :: :: View next topic  
Author Message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Mon May 11, 2009 10:41 am    Post subject: Error code -206 while fetching record from table
Reply with quote

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
View user's profile Send private message

Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon May 11, 2009 11:00 am    Post subject:
Reply with quote

Hi,
Please verify the column names in the query.

Code:
WHERE :DCLPLCY-POLICY-NBR = WS-POLICY-NBR
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Mon May 11, 2009 11:02 am    Post subject:
Reply with quote

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
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Mon May 11, 2009 11:29 am    Post subject: Reply to: Error code -206 while fetching record from table
Reply with quote

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
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Mon May 11, 2009 11:43 am    Post subject: Reply to: Error code -206 while fetching record from table
Reply with quote

okie, i removed the working storage variable from WHERE clause.

the error is debugged.

Thanks all.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us