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
 

 

can anybody help me to resolve this REXX RC(-3) error?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Sat Oct 04, 2008 4:55 pm    Post subject: can anybody help me to resolve this REXX RC(-3) error?
Reply with quote

I am preparing a REXX tool. for that,i like to do dynamic sql queries. so first i tried to make rexx-db2 connectivity. I am facing the following problem. this is my piece of code

/*REXX*/
/*TRACE I*/
ADDRESS TSO "SUBCOM DSNREXX"
IF RC = 1 THEN DO
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
IF RC=0 THEN SAY 'ADDED'
ELSE SAY 'NOT ADDED'
END
ELSE SAY 'RC=' RC
ADDRESS DSNREXX
ADDRESS DSNREXX "CONNECT "DBT1" "
IF RC=0 THEN SAY 'RC' RC
ELSE SAY 'OVER'
SAY 'RC=' RC
EXIT


this was my error/output:

RC= 0
11 *-* ADDRESS DSNREXX "CONNECT "DBT1" "
+++ RC(-3) +++
OVER
RC= -3

can anybody help me to avoid this RC(-3)?.

note: i put more effort to resolve this..but i could not.

Thanks!
Suku.
Back to top
View user's profile Send private message

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Oct 04, 2008 4:59 pm    Post subject:
Reply with quote

What is the content of DBT1?
Make a SAY before
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Sat Oct 04, 2008 5:05 pm    Post subject:
Reply with quote

DBT1 is the SSID. i am trying to establish DB2-REXX connectivity.

i tried with this stmt :
ADDRESS DSNREXX "CONNECT " DBT1

i am facing the same problem.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Oct 04, 2008 5:28 pm    Post subject:
Reply with quote

Running in batch ? Using IRXJCL ?
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Oct 04, 2008 5:37 pm    Post subject:
Reply with quote

I know DBT1 is your SSID.


Quote:
ADDRESS DSNREXX "CONNECT " DBT1

Trying like this is exactly the same than the first time.

I asked you to display the content of DBT1.
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Sat Oct 04, 2008 5:42 pm    Post subject:
Reply with quote

i dont know exactly..
here is the procedure am following to execute the rexx code
1. ispf>start 6 and the TSO command "ALLOC DD(SYSEXEC) DSN('<PDS (member)') SHR REUSE"
2.line command 'EX' to execute that member.

thank you for your reply.
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Sat Oct 04, 2008 6:00 pm    Post subject:
Reply with quote

sorry PeD...i cant get you.
how to display the contents of DBT1?..i dont know even.. from my understanding, i thought if i give SSID,it will connect to DB2 which has all my Tables. and using sql statements like
SQLSTMT= "SELECT SRC_CD,LGCY_SRC_ID,CNSM_ID,PARTN_NBR",
"FROM "CREATOR"."TABLE" WHERE ALT_ID_TYP_CD='SRC'",
"AND ALT_CNSM_ID=? AND ROW_STS_CD='A' WITH UR;"

i can get the data..i dont know what SSID really means.

Thanks.
blind user.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Oct 04, 2008 6:21 pm    Post subject:
Reply with quote

Just to know if the content DBT1 was not altered by a junk value.

But in this case the CONNECT must work, and you receive -991 (?) - I guess - afterwards when trying to perform operation in DB2.


So if you type EXEC in front of the member, you are executing in foreground.

Sorry no idea more.

Is the code your posted in your first question the whole code or is it an extract?
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Sat Oct 04, 2008 6:38 pm    Post subject:
Reply with quote

yes..this is the whole code.my plan is first to make proper DB2 connect and disconnect..

i can verify the content of DBT1,if i know how to view it and how it shd be icon_smile.gif .

how to check whether dynamic sql can be run or not in my mainframe (installation)settings?..anything need to be installed or updated?.

Thanks!
Suku.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Oct 04, 2008 7:33 pm    Post subject:
Reply with quote

To see the content just put a SAY in your REXX program.

To check your DB2 SSID, go into SDSF and prefix DBT1MSTR to see if the task ( the DB2 ) is running.

Use also SPUFI in D DB2I defaiults, or File Aid to check the SSID.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Oct 04, 2008 7:52 pm    Post subject:
Reply with quote

Have you ran it using TRACE I
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Sat Oct 04, 2008 11:41 pm    Post subject:
Reply with quote

ran with TRACE I as well as without.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Sun Oct 05, 2008 6:19 am    Post subject: Reply to: can anybody help me to resolve this REXX RC(-3) er
Reply with quote

The TRACE was not to fix your problem, but an aid to perform problem determination. I think the earlier posters wanted to see the results of the trace.
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Mon Oct 06, 2008 10:56 pm    Post subject:
Reply with quote

i tried to display DBT1. it Assumes DBT1 as a variable.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Oct 07, 2008 12:36 am    Post subject: Reply to: can anybody help me to resolve this REXX RC(-3) er
Reply with quote

Quote:
I think the earlier posters wanted to see the results of the trace.

With emphasis on 'see'. That is, can you post your trace here?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Oct 07, 2008 12:43 am    Post subject: Reply to: can anybody help me to resolve this REXX RC(-3) er
Reply with quote

Quote:
it Assumes DBT1 as a variable.

More questions: Is there a DB2 system called DBT1? Is it started and ready to accept work? Is it on the same sz/OS system as your rexx is running on?
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Tue Oct 07, 2008 9:02 pm    Post subject:
Reply with quote

This is my whole code:
Code:

/*REXX*/                                                               
/*TRACE I*/                                                             
   SSID = 'DBT1'                                                       
 ADDRESS  ISPEXEC "LIBDEF ISPLLIB DATASET ID('DSN.DBT1.DSNLOAD')"       
           SAY 'RC_0'RC                                                 
 ADDRESS  ISPEXEC "LIBDEF ISPLLIB DATASET ID('DSN.DBT1.DSNEXIT')"       
           SAY 'RC_0'RC                                                 
                     'SUBCOM DSNREXX'                                   
         IF RC\=0 THEN DO                                               
           SAY 'RC_00'RC                                               
   S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX','DSN.DSN81B.SDSNLOAD')     
/* S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX','DSN.DBT1.DSNLOAD') */     
       END                                                             
           SAY 'RC_1'RC                                                 
           ADDRESS DSNREXX                                             
           SAY 'DSNREXX' RC                                             
           SAY                                                         
           ADDRESS DSNREXX 'CONNECT SSID'                               
                SAY 'CONNECT' RC   


This is the output:

Code:
RC_00 
RC_00 
RC_10 
DSNREXX 0                                     
                                               
    18 *-* ADDRESS DSNREXX 'CONNECT SSID'     
       +++ RC(-3) +++                         
CONNECT -3                                           


i was unable to display DBT1. if possible, post me a piece code to display SSID.

i am getting RC=0 for
Code:
ADDRESS  ISPEXEC "LIBDEF ISPLLIB DATASET ID('DSN.DBT1.DSNLOAD')" 


but i did TSO ISRDDN. i dont find the 'DSN.DBT1.DSNLOAD' added in that lib.

can anybody help me to resolve this RC(-3)?. i like to run this in foreground.

Note: i ran the another code using JCL to connect DBT1.i was able to connect.but it takes very long time.

Thanks!
suku
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Tue Oct 07, 2008 9:10 pm    Post subject:
Reply with quote

Hi Ped,
answer is yes for all your question.

we have ssid(region) called DBT1/DBS1/DBQ1/DBP1.


Thanks!
suku
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 27
Location: chennai

PostPosted: Tue Oct 07, 2008 9:14 pm    Post subject:
Reply with quote

i tried with
ADDRESS DSNREXX 'CONNECT' SSID
also.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Oct 07, 2008 9:35 pm    Post subject: Reply to: can anybody help me to resolve this REXX RC(-3) er
Reply with quote

Quote:
but i did TSO ISRDDN. i dont find the 'DSN.DBT1.DSNLOAD' added in that lib.

Please read the ISPF Services Guide manual, and read the part about LIBDEF with UNCOND and STKADD parameters.


Quote:
i tried with
ADDRESS DSNREXX 'CONNECT' SSID
also.

I think that is the correct invocation, rather than what was shown in your earlier example. Things outside of quotes are variables; things within quotes are literals.

Use the SAY instruction to display the contents of a variable.

You were asked to use TRACE I and then show us the results... still waiting for it.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm


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