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
 

 

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
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
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 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


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