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
 
can anybody help me to resolve this REXX RC(-3) error?
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

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
References
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 22
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: 22
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: 22
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: 536
Location: work

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
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 22
Location: chennai

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

Am i using TRACE I wrongly?..i included it in my program. right?.
Back to top
View user's profile Send private message
PeD

Senior Member


Joined: 26 Nov 2005
Posts: 313
Location: Belgium

PostPosted: Tue Oct 07, 2008 11:26 pm    Post subject:
Reply with quote

I copied/pasted your code, change the SSID to fit with mine.
I just modified the ISPLLIB.
I ran it and it ran fine.
So I am lost.

Can you restart from a white paper and just execute this.

Code:
/*REXX*/                                                               
/*TRACE I*/                                                             
SSID = 'DBT1'
ADDRESS  TSO 'SUBCOM DSNREXX'                                   
IF RC\=0 THEN DO                                               
   S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')                           
ADDRESS DSNREXX 'CONNECT'  SSID                               
SAY 'CONNECT' RC   
Exit
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

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

Quote:
Am i using TRACE I wrongly?..i included it in my program. right?.

You have it within a comment, so it does not get executed.

Quote:

I just modified the ISPLLIB.
I ran it and it ran fine.

I tried to say it in my earlier append. It is a LIBDEF issue. He issues two libdefs, but the second one overrides the first.

Please read the ISPF Services Guide manual, and read the part about LIBDEF with UNCOND and STKADD parameters.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

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

Quote:
I tried to say it in my earlier append.

Actually, I tried to be somewhat vague... people learn more when the work through the problem and finally solve it.
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 22
Location: chennai

PostPosted: Thu Oct 09, 2008 6:57 pm    Post subject:
Reply with quote

Hi Ped,
i am getting the same error for your code. i.e.,
Code:
/*REXX*/                                                               
/*TRACE I*/                                                             
SSID = 'DBT1'
ADDRESS  TSO 'SUBCOM DSNREXX'                                   
IF RC\=0 THEN DO                                               
   S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')                           
ADDRESS DSNREXX 'CONNECT'  SSID                               
SAY 'CONNECT' RC   
Exit


output is:
Code:
     7 *-* ADDRESS DSNREXX 'CONNECT'  SSID   
        +++ RC(-3) +++                       
 CONNECT -3                                   
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 22
Location: chennai

PostPosted: Thu Oct 09, 2008 7:08 pm    Post subject:
Reply with quote

Hi Ped,
here is the output with TRACE I:

Code:
     3 *-* SSID = 'DBT1'                                                       
       >L>   "DBT1"                                                           
     4 *-* ADDRESS  ISPEXEC "LIBDEF ISPLLIB DATASET ID('DSN.DBT1.DSNLOAD')"   
       >L>   "LIBDEF ISPLLIB DATASET ID('DSN.DBT1.DSNLOAD')"                   
      5 *-* SAY 'RC_0'RC                                                       
        >L>   "RC_0"                                                           
        >V>   "0"                                                               
        >O>   "RC_00"                                                           
 RC_00                                                                         
      6 *-* ADDRESS  ISPEXEC "LIBDEF ISPLLIB DATASET ID('DSN.DBT1.DSNEXIT')"   
        >L>   "LIBDEF ISPLLIB DATASET ID('DSN.DBT1.DSNEXIT')"                   
      7 *-* SAY 'RC_0'RC                                                       
        >L>   "RC_0"                                                           
        >V>   "0"                                                               
        >O>   "RC_00"                                                           
 RC_00                                                                         
      8 *-* 'SUBCOM DSNREXX'                                                   
        >L>   "SUBCOM DSNREXX"                                                 
      9 *-* IF RC:=0                                                           
        >V>   "0"                                                               
        >L>   "0"                                                               
        >O>   "0"                                                               
     14 *-* SAY 'RC_1'RC                                                       
        >L>   "RC_1"                                                           
        >V>   "0"                                                               
        >O>   "RC_10"                                                           
 RC_10                                                                         
    15 *-* ADDRESS DSNREXX                               
    16 *-* SAY 'DSNREXX' RC                             
       >L>   "DSNREXX"                                   
       >V>   "0"                                         
       >O>   "DSNREXX 0"                                 
DSNREXX 0                                               
    17 *-* SAY                                           
                                                         
    18 *-* ADDRESS DSNREXX 'CONNECT' SSID               
       >L>   "CONNECT"                                   
       >V>   "DBT1"                                     
       >O>   "CONNECT DBT1"                             
       +++ RC(-3) +++                                   
    19 *-* SAY 'CONNECT' RC                             
       >L>   "CONNECT"                                   
       >V>   "-3"                                       
       >O>   "CONNECT -3"                               
CONNECT -3                                               
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

PostPosted: Thu Oct 09, 2008 8:03 pm    Post subject:
Reply with quote

From your latest post it appears that you have not acted upon the sound advice given by Pedro.

Because you are doing TWO LIBDEF's the second LIBDEF will replace the first LIBDEF, i.e. REMOVE it from the library definitions order.

OK, so we have a couple of options here - use the STKADD parameter or maybe something else like this .......................

Code:

CCAT = "'DSN.DBT1.DSNLOAD' 'DSN.DBT1.DSNEXIT'"
"ISPEXEC LIBDEF ISPLLIB DATASET ID("CCAT") STACK"


Please pay attention to the help that others give you, even if it does involve reading a manual yourself.
Back to top
View user's profile Send private message
sukumar.pm

New User


Joined: 20 Dec 2007
Posts: 22
Location: chennai

PostPosted: Thu Oct 09, 2008 9:29 pm    Post subject:
Reply with quote

Hi expat,

FYI: i just wanted show the TRACE I output to PeD.that y i did not removed the second ispllib statement.
i studied the ISPF Services Guide manual. i have not got better idea yet.
Code:

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


i got RC=-3 for the last RC statement.

i have already tried with concatination in different way..that is also successful.
but my connect statement got RC=-3.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

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

Quote:
i have already tried with concatination in different way..that is also successful.

Not very useful diagnostic information.

Please read the ISPF Services Guide manual. And read how to specify a list of datasets. I do not believe your example follows the syntax guidelines described in the manual.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 536
Location: work

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

Code:

    18 *-* ADDRESS DSNREXX 'CONNECT' SSID               
       >L>   "CONNECT"                                   
       >V>   "DBT1"                                     
       >O>   "CONNECT DBT1"                     


I do no think this is related to your problem, but earlier posts asked about the value of SSID. From the trace, we can see that the value of SSID is still DBT1.

So, continue using trace as needed to debug your program.
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 HoursGoto page Previous  1, 2, 3  Next
Page 2 of 3