View previous topic :: View next topic
|
Author |
Message |
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
I want to connect to database through rexx and want to execute some queries. I searched for this and wrote one code. I am getting error. Can any one correct this please?
/*rexx*/
Address TSO "SUBCOM DSNREXX"
If RC = 0 Then do
address dsnrexx
"connect" ABC
if rc <> 0 then
say rc
say sqlcode
end
exit
After executing this i am not able to connect to ABC database. I am getting rc = -1 and sqlcode=-107. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Have you installed the REXX/DB2 interface?
O. |
|
Back to top |
|
|
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
No. What is it? |
|
Back to top |
|
|
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
With out installing REXX/DB2 interface i can not connect to database? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You got it
O. |
|
Back to top |
|
|
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
Is it an add-on-product? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
No, but there are few steps you need to perform in order to activate it. All the info is in the fine manual.
O. |
|
Back to top |
|
|
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
Can you send me the link ? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
It's in my previous post (look for the underlined letters).
O. |
|
Back to top |
|
|
Kiranmayee
New User
Joined: 09 Jan 2008 Posts: 25 Location: India
|
|
|
|
Hi
I haven't installed REXX/DB2 interface on my system But i am able to connect to DB2 through REXX. But where to see the output for a select query. below is the REXX code.
/*rexx*/
Address TSO "SUBCOM DSNREXX"
If RC <> 0 Then Do
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
If S_RC <> 0 Then
Say 'Problem Loading DB2 environment'
End
else
address dsnrexx
"connect" TDSN
if rc = 0 then do
say rc
say sqlcode
sam = execsql 'select * from frspsup.vcl03',
'where s_clntlocn_numb = '11111''
say sqlcode
say sam
exit
After executing the above code i got the following output
0
0
0
EXECSQL select * from frspsup.vcl03 where s_clntlocn_numb = 11111,
I am not able to see the output for my select query. |
|
Back to top |
|
|
|