Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
REXX 2 DB2 connection

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 192
Location: India

PostPosted: Wed Jan 25, 2006 4:48 pm    Post subject: REXX 2 DB2 connection
Reply with quote

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
View user's profile Send private message
References
PostPosted: Wed Jan 25, 2006 4:48 pm    Post subject: Re: REXX 2 DB2 connection Reply with quote

MGIndaco

Moderator


Joined: 10 Mar 2005
Posts: 479
Location: Milan, Italy

PostPosted: Wed Jan 25, 2006 5:03 pm    Post subject:
Reply with quote

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

Active User


Joined: 30 Oct 2005
Posts: 192
Location: India

PostPosted: Wed Jan 25, 2006 5:11 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 27 Dec 2005
Posts: 1897
Location: Israel

PostPosted: Wed Jan 25, 2006 5:54 pm    Post subject:
Reply with quote

That's easy: Look at this chapter in the fine manual.

O.
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 192
Location: India

PostPosted: Wed Jan 25, 2006 6:08 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 27 Dec 2005
Posts: 1897
Location: Israel

PostPosted: Wed Jan 25, 2006 6:14 pm    Post subject:
Reply with quote

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

Active User


Joined: 30 Oct 2005
Posts: 192
Location: India

PostPosted: Wed Jan 25, 2006 6:25 pm    Post subject:
Reply with quote

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

Active User


Joined: 30 Oct 2005
Posts: 192
Location: India

PostPosted: Wed Jan 25, 2006 9:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1