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
 

 

REXX to DB2 call

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: REXX to DB2 call
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 07, 2013 1:49 pm    Post subject:
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    Post subject: Reply to: REXX to DB2 call
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Mar 07, 2013 2:01 pm    Post subject: Reply to: REXX to DB2 call
Reply with quote

I expected it not to work
see here why
http://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    Post subject:
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

Senior Member


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

PostPosted: Thu Mar 07, 2013 7:55 pm    Post subject: Reply to: REXX to DB2 call
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Mar 07, 2013 8:03 pm    Post subject: Reply to: REXX to DB2 call
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: 1753
Location: Bloomington, IL

PostPosted: Thu Mar 07, 2013 8:34 pm    Post subject:
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    Post subject: Re: REXX to DB2 call
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


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