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

REXX to DB2 call


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Thu Mar 07, 2013 1:11 pm
Reply with quote

Hi,
I want to connect to DB2 to query on a table directly through REXX. Below is how it was coded:

Code:

INITPROC:
ADDRESS ISPEXEC                                     
     "LIBDEF ISPPLIB DATASET ID('DB2T.DBDC.DSNLOAD')"
     SAY 'RC ' RC                                   
ADDRESS TSO "SUBCOM DSNREXX"                         
     SAY 'RC ' RC                                                                   
IF RC > 0 THEN                                       
 DO                                                                                   
   S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')         
 END                                                 


error thrown

Code:
   173 *-*       S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
       >L>         "ADD"                                   
       >L>         "DSNREXX"                               
       >L>         "DSNREXX"                               
   173 +++       S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
    35 +++    CALL INITPROC                                 
Error running REXCALDB, line 173: Routine not found         


I have verified that RXSUBCOM exists in load library DB2T.DBDC.DSNLOAD

Please suggest some solution
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 07, 2013 1:49 pm
Reply with quote

Suggest that you try using ISPLLIB rather than ISPPLIB for the load library allocation icon_wink.gif
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Thu Mar 07, 2013 1:57 pm
Reply with quote

Tried that. Not working
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 07, 2013 2:01 pm
Reply with quote

I expected it not to work
see here why
ibmmainframes.com/viewtopic.php?t=60341&highlight=libdef+directed

the message You received is quite strange
You should have received something like

Code:
IRX0250E System abend code 806, reason code 00000004.
 IRX0253E Abend in external function RXSUBCOM.
      3 +++ zzzz =  RXSUBCOM("ADD","DSNREXX","DSNREXX")
 IRX0040I Error running ZSNIPPT, line 3: Incorrect call to routine
Back to top
View user's profile Send private message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Thu Mar 07, 2013 3:16 pm
Reply with quote

Thanks for the reply. I was discussing the same with few of my teammember they also tolde the same kind of thing. I guess i need to talk to my support team.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Mar 07, 2013 7:55 pm
Reply with quote

Try using the TSOLIB command when you first logon.

Quote:
Tried that. Not working

It is not clear why you would then try putting a load library into the panel concatenation and showing us that version.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 07, 2013 8:03 pm
Reply with quote

seems that the TS changed the LIBDEF to ISPLLIB

anyway the behavior i still murky ...

a quick and dirty test showed that

REXX will not know about modules in a LIBDEF ISPLLIB

but DOES know about modules in the ISPLLIB concatenation

ISPF will find things because IT KNOWS about active LIBDEFs and can use a directed load

REXX will simply use the standard search hierarchy

most probably at ISPF startup ISPLLIB is considered as a TASKLIB so it becomes part of the standard search for everybody

for these issues DEFINITELY the shop support intervention is required

TSOLIB need to be issued in a raw tso environment
but usually most shops do not let people do that
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Mar 07, 2013 8:34 pm
Reply with quote

Priyanka Pyne wrote:
Thanks for the reply. I was discussing the same with few of my teammember they also tolde the same kind of thing. I guess i need to talk to my support team.

Talk to them about dynamic STEPLIB tools for TSO.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Tue Mar 12, 2013 3:09 pm
Reply with quote

Priyanka Pyne wrote:
Hi,
I want to connect to DB2 to query on a table directly through REXX. Below is how it was coded:

Code:

INITPROC:
ADDRESS ISPEXEC                                     
     "LIBDEF ISPPLIB DATASET ID('DB2T.DBDC.DSNLOAD')"
     SAY 'RC ' RC                                   
ADDRESS TSO "SUBCOM DSNREXX"                         
     SAY 'RC ' RC                                                                   
IF RC > 0 THEN                                       
 DO                                                                                   
   S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')         
 END                                                 


error thrown

Code:
   173 *-*       S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
       >L>         "ADD"                                   
       >L>         "DSNREXX"                               
       >L>         "DSNREXX"                               
   173 +++       S_RC=RXSUBCOM('ADD','DSNREXX','DSNREXX')
    35 +++    CALL INITPROC                                 
Error running REXCALDB, line 173: Routine not found         


I have verified that RXSUBCOM exists in load library DB2T.DBDC.DSNLOAD

Please suggest some solution


I also encountered this before , it was because the logon procedure , if your logon procedure does not allocate the corresponding LIB , you could not run RXSUBCOM , you'd better change your logon proc
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 -> CLIST & REXX

 


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