Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 connectivity using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
vtham

New User


Joined: 08 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Tue Sep 08, 2009 3:30 pm    Post subject: DB2 connectivity using REXX
Reply with quote

Hi,

Please find the below code and error message I receive while trying to check for DB2 connectivity. Initially started runing the actual SQL and as it failed, wrote the below to check the connectivity and it shows the below error.

Thank you.

=====

LIBDEF ISPLLIB DATASET ID('SDB25A.SDSNLOAD')
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS TSO "SUBCOM DSNREXX"
IF RC <> 0 THEN DO
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
IF S_RC <> 0 THEN DO
SAY 'PROBLEM LOADING DB2 ENVIRONMENT'
EXIT
END
END
ADDRESS DSNREXX "CONNECT "LOCDB25

======

2 +++ LIBDEF ISPLLIB DATASET ID('SDB25A.SDSNLOAD')
IRX0043I Error running DB2LINK, line 2: Routine not found
***

======

VIEW SDB25A.SDSNLOAD
Command ===>
Name Prompt Alias-of
_________ DSNREXX
_________ RXSUBCOM DSNREXX
======
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 09, 2009 12:43 am    Post subject:
Reply with quote

Hello,

Suggest you talk with your support people to detemine which labrary(ies) are missing from your library concatenation.
Back to top
View user's profile Send private message
vtham

New User


Joined: 08 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Sat Oct 24, 2009 1:52 am    Post subject:
Reply with quote

Hi Dick,
After checking back with my support group, have made few modifications with the code and still it fails. ADDRESS DSNREXX "CONNECT" DB25 - is failing, Can you please assist

Code:
    /*************************** REXX COMMAND ****************************/
    ADDRESS ISPEXEC                                                         
    "CONTROL ERRORS RETURN"                                                 
    "LIBDEF ISPLLIB DATASET ID('SDB25A.SDSNLOAD' 'SDB25A.SERVLIB' ",       
      "'SDB25A.RUNLIB.LOAD')"                                               
    SAY "RETURN CODE1 "RC                                                   
    ADDRESS TSO "SUBCOM DSNREXX"                                           
    SAY "RETURN CODE2 "RC                                                   
    IF RC <> 0 THEN                                                         
      S_RC = RXSUBCOMM('ADD','DSNREXX','DSNREXX')                           
      SAY "RETURN CODE3 "RC ;                                               
      ADDRESS DSNREXX                                                       
      "CONNECT" DB25                                                       
      SAY "RETURN COD3A "RC                                               
      SQLSTMT="SELECT ID_BR_IMMS FROM LOCDB25.DEV23MMD.IMMS_MMB_V"         
      SAY "RETURN CODE4 "RC                                                 
      "EXECSQL DECLARE C1 CURSOR FOR S1"                                   
      SAY "RETURN CODE5 "RC                                                 


Code:

RETURN CODE1 0
RETURN CODE2 0
RETURN CODE3 0
13 *-* "CONNECT" DB25                               
           +++ RC(-3) +++                                   
                   RETURN COD3A -3                                         
                    RETURN CODE4 -3                                         
17 *-* "EXECSQL DECLARE C1 CURSOR FOR S1"           
       +++ RC(-3) +++                                   
    RETURN CODE5 -3                                         
        19 *-* "EXECSQL PREPARE S1 FROM :SQLSTMT"    
       
Back to top
View user's profile Send private message
vtham

New User


Joined: 08 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Sat Oct 24, 2009 1:57 am    Post subject:
Reply with quote

Just want to add this too

Code:

    INSYNC --------------- BROWSE - Table/View Specification ---------------
    COMMAND ===>                                                                  
                                                     DB2ID       ==>    DB25         
                                                     SQLID       ==>                 
                                                     LOCATION    ==>    LOCDB25   
                                                                             
       Creator              ===>    DEV23MMD                                       
                                                                         
       Table/View name      ===>    IMMS_MMB_V                                     
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 4 Sat Nov 18, 2017 7:40 pm
No new posts REXX LISTDSI () SMSINFO is not working upendrasri CLIST & REXX 4 Fri Nov 17, 2017 11:33 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 4 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us