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
 

 

REXX 2 DB2 connection

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

Active User


Joined: 30 Oct 2005
Posts: 186
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

MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
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: 186
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: 2360
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: 186
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: 2360
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: 186
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: 186
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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