Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us