IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 v9.1 RID function


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Thu May 10, 2012 2:28 am
Reply with quote

Hi All,

We are using DB2 V9.1 and trying to use RID function by using a select query like this

Code:
SELECT RID(TABLE1) FROM TABLE1
WHERE  COL1 = '1234567';


However we are getting this response:

Code:
SQLCODE = -206, ERROR:  TABLE1 IS NOT VALID IN THE CONTEXT WHERE
IT IS USED


We are aware that RID can be used in this version, but unsure where we are getting it wrong. Any ideas?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 10, 2012 4:09 am
Reply with quote

you may wish to see the value returned by 3.2.52 GETVARIABLE,
using SYSIBM.NEWFUN from the list contained (and explained) in 2.18.9 References to built-in session variables
Back to top
View user's profile Send private message
T-Rex

New User


Joined: 26 Oct 2007
Posts: 1
Location: Bonn

PostPosted: Thu May 10, 2012 4:18 pm
Reply with quote

I tried the Sample from the SQL Reference:

SELECT RID(DSN8910.EMP), LASTNAME
FROM DSN8910.EMP
WHERE EMPNO = '000020';


This works.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
No new posts INSYNC option with same function as I... JCL & VSAM 0
Search our Forums:

Back to Top