IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohanthengal

Active User


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

PostPosted: Fri Jul 16, 2010 6:50 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jul 16, 2010 7:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top