View previous topic :: View next topic
|
Author |
Message |
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
Can anyone please help me as fast as you can in a REXX routine that is connecting DB2. That's why I used the call -
ADDRESS TSO "SUBCOM DSNREXX"
IF RC = 0 THEN DO
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX') END
ADDRESS DSNREXX "CONNECT NDBD"
But in this step it showing an error of return code -3.
I am unable to find out the error. Can anyone please help?
Thanx in advance,
Regards,
Amitava Chowdhury |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Return Code - 3 is usually received when the function that you call is not available(or not present).
For this case we need to know if you installation is upgraded for this feature.
I hope in this. |
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
I checked already that DSNREXX is not available in my system.Please then help me the way to connect REXX routine with DB2. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
But where from I will get the job DSNTIJRX? Please help me by saying the steps what I have to do to run a DB2-embedded REXX routine. Is it not possible to run a DB2-embedded REXX routine without submitting a job? I mean in simple way I will specify the way to connect to database and executing a simple query. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
OK, I will read the manual for you.
DSNTIJRX is a one-time job, required for binding the REXX interface to DB2.
You can find DSNTIJRX in your DB2 system libraries, in the sample library (something like 'DSN*.SDSNSAMP').
O. |
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
Thanx a lot. PLease help me out. I am also searching it. If I have got, then I will inform you also.
Regards,
Amitava |
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
Hi All,
It was my fault to run the REXX routine. Actually the way to code a DB2-embeded REXX routine is that we should try to subcom DSNREXX
first. If the rc is 1 i.e the service is not present, then we have to add the service by RXSUBCOM('ADD','DSNREXX','DSNREXX'). Actually the code will be like -
ADDRESS TSO "SUBCOM DSNREXX"
IF RC = 1 THEN DO
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
END
ADDRESS DSNREXX "CONNECT <DB2-SYSTEM>"
If this is done, then the code will be fine.
Regards,
Amitava |
|
Back to top |
|
|
|