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
 

 

What is RC = -1 here in REXX DB2 connectivity ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 181
Location: Globe, India

PostPosted: Fri Jul 16, 2010 6:50 pm    Post subject: What is RC = -1 here in REXX DB2 connectivity ?
Reply with quote

Pls help me out over here...! It is saying connection error with Return code as -1... i am not able to debug this. I checked out the DSN1 name .. it is right !

Please help me in this.

/* rexx */
/* Check for the DSNREXX environment */
address tso 'subcom dsnrexx'
if rc \= 0 then
do
/* Add DSNREXX to the REXX host command environment table */
RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
end
if rc = 0 then
say 'dsnrexx to rexx host environment has been added successfully'
else
say 'error: dsnrexx could not be added in rexx host environment'

/* Connecting to DB2 Subsystem */
ADDRESS DSNREXX 'CONNECT' DSN1
say rc
if rc = 0 then
say 'connection established successfully'
else
say 'connection error'
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2433
Location: Netherlands, Amstelveen

PostPosted: Fri Jul 16, 2010 7:00 pm    Post subject:
Reply with quote

Use 'SUBCOM DSNREXX' instead of address tso 'subcom dsnrexx'
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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