Db2 for z/OS & Db2ZAI

 View Only
  • 1.  -805/51002 error connecting to z/OS from LUW tools

    Posted 25 days ago

    Hi, all,

    First, disclaimer that I am primarily a LUW guy with very limited mainframe experience.  That said, I'm working on a project that's mainframe-heavy and am trying to come up to speed quickly.

    I'm working with IBM Content Manager OnDemand for z/OS.  When I have worked with CMOD (distributed) in the past, I've used a lot of scripts that just hit DB2 directly.  I'm trying to do the same thing here.

    When I try to connect to DB2 z/OS from my laptop, I'm always getting the same -805/51002 error.  Doesn't matter if I'm using DBeaver, DbVisualizer, VS Code Extension, or Data Studio.

    After talking to the DBA, he told me the following:

    "The issue is that the tools are attempting to use this package to connect to DB2: "...NULLID.SYSLH200....".  That package does not exist in the CMOD databases.  You would need to install DB2 Connect on your laptop, connect to the DB2, and then you will be able to connect to CMOD with your tools."

    I consider myself competent with DB2 LUW, but this sounds foreign to me.  Can someone explain like I'm 5?  I understand what DB2 Connect is/does, but not in this context.  Am happy to provide more detail if needed.

    Thanks in advance!



    ------------------------------
    Charles Renaud
    ------------------------------


  • 2.  RE: -805/51002 error connecting to z/OS from LUW tools

    IBM Champion
    Posted 22 days ago

    Hi, seems like you have the Db2 'connect' driver on your laptop, but the Db2 package for the code is not on the mainframe.  After you installed Db2 'connect' there are some extra steps to bind the package to the mainframe.  Take a look at this, https://www.ibm.com/docs/en/db2/11.5?topic=overview-binding-database-utilities-db2-connect hopefully this will help.  You might need to get your DBA to do the bind depending on yor security setup.



    ------------------------------
    Phill Baker
    ------------------------------



  • 3.  RE: -805/51002 error connecting to z/OS from LUW tools

    IBM Champion
    Posted 22 days ago

    For access to Db2 Zos you need to have the Nullid package for the Db2 Connect/Drivers bound to each of the Db2 Zos subsystem to plan to access.  In addition Db2 connect will need to be licensed.  Once you have  the license I would recommend activating it on the mainframe.  You may also need to include it in your non zos environment.  

    There is a lot more we could discuss to get you up to speed on the product with online meeting.  



    ------------------------------
    Douglas Partch
    DatabaseNerds
    ------------------------------



  • 4.  RE: -805/51002 error connecting to z/OS from LUW tools

    Posted 21 days ago

    Charles Renaud,

     

    This is addressed to your query about SYSLH200 on Friday 5/24.  For whatever reason, the "Reply to" button in the consolidated journal doesn't include any of the original text.

    So: 

     

    There's a very good general discussion (which, very sorry, won't fit in "r/eli5"!)  about packages in the IBM Support site: 

    https://www.ibm.com/support/pages/75-ways-demystify-db2-9-tech-tip-db2-cli-packages-demystified

     

    The piece of it which seems to apply to your case is this:

     

    Common cases of SQL0805N PACKAGE NOT FOUND errors:

    Case: 1) If you receive SQL0805N for one of the above packages, then it shows that the package is missing in your database for some reason.

     To create those packages, bind db2cli.lst from <instance dir>/sqllib/bnd.

    db2 "bind @db2cli.lst blocking all sqlerror continue grant public "

     

    The italicized line is a DB2 Command-line processor statement, which you may need to discuss with the mainframe DBA for your CMOD instance.  Hope this helps (HTH)!

     

    /phil

     

     

    Philip Sevetson

    Computer Systems Manager

    FISA-OPA

    5 Manhattan West

    New York, NY 10001

    psevetson@fisa-opa.nyc.gov

    917-991-7052 (m)

     

     






  • 5.  RE: -805/51002 error connecting to z/OS from LUW tools

    Posted 21 days ago

    Hi Charles. If you have been able to connect you must have a driver or a version of the Db2 client software installed on your local machine. I'm not familiar with the CMOD product so perhaps it comes with it.

    A remote Db2 Connect client requires a license in order to connect to Db2 on z, so unless the CMOD software comes with a runtime copy of the license like Data Studio does, you need a Db2 Connect license on your machine (unless server-based licensing is enabled). According to your description you have not been restricted from connecting, but instead get an error on sql execution.

    The error message is definitely saying that a required cli package is not created at the z/OS Db2 location you are connecting to. 

    If you have a Db2 client, you most likely have the necessary pieces to execute the bind. The files will be in the bnd folder under SQLLIB.  A resource (generally on MF) with BIND authority will have to execute the bind so the packages get created and granted execute to PUBLIC. In some shops the DBA performs these while others have a System Admin perform binds for database "tools".

    If you only have the driver package, then you will not have the necessary files and would need to get the client from the IBM site for installation on a client machine before the above bind is performed. 

    If there are other Db2 on z subsystems at your company that support remote access, these packages must be in place. Perhaps the support area that performed the bind in these can be determined and then can simply perform the new BIND in your CMOD system. They may have the components and process available to perform for you.



    ------------------------------
    Robert Bizley
    ------------------------------



  • 6.  RE: -805/51002 error connecting to z/OS from LUW tools

    Posted 21 days ago

    CMOD isn't really relevant here from a licensing perspective.  I'm just trying to use Data Studio to connect to the DB2 z/OS database that is back-ending CMOD.  The issue appears to be that when that DB2 database is originally created, it doesn't include what's needed for DB2 Connect.

    A lot of great feedback here and I appreciate everyone's replies.  I'll discuss with the DBA to see what he can do on the z/OS side.



    ------------------------------
    Charles Renaud
    ------------------------------



  • 7.  RE: -805/51002 error connecting to z/OS from LUW tools

    Posted 21 days ago

    it seems that you missed to bind your db2 connect packages from luw, ddcsmvs.lst.



    ------------------------------
    Sergi Padró i Blasi
    ------------------------------



  • 8.  RE: -805/51002 error connecting to z/OS from LUW tools

    Posted 20 days ago

    Hi Charles,

    I believe we create those packages in our shop by running the "JCC Binder" job, referenced here: https://www.ibm.com/docs/en/db2-for-zos/12?topic=installation-db2binder-utility

    Here is some sample JCL.  You'll need to customize it for your libraries, JAVA directories, etc.

    //*******************************************************
    //DB2BNDR  EXEC PGM=AOPBATCH,PARM='sh -L'                
    //*******************************************************
    //SYSTSPRT DD SYSOUT=*                                   
    //SYSPRINT DD SYSOUT=*                                   
    //SYSUDUMP DD SYSOUT=*                                   
    //STDERR   DD SYSOUT=*                                   
    //STDOUT   DD SYSOUT=*                                   
    //STDIN    DD *                                          
    export JAVA_HOME=/Root/java/J8.0_sr2fp10_bit64/     
    export JCC_HOME=/Root/db2/v12/RSU2206A/jdbc/        
    export LD_LIBRARY_PATH=$JCC_HOME/lib                     
    PATH=$JAVA_HOME:$JAVA_HOME/bin:$PATH                     
    PATH=$JCC_HOME/bin:$PATH                                 
    export PATH=$JZOS_HOME:$PATH                             
    LIBPATH=$JCC_HOME/lib:$LIBPATH                                           
    LIBPATH=$JAVA_HOME/bin/classic:$JAVA_HOME/bin:$LIBPATH                   
    export LIBPATH=$JZOS_HOME:$LIBPATH                                       
    CLASSPATH=$CLASSPATH:${JCC_HOME}/classes/db2jcc4.jar                     
    CLASSPATH=$CLASSPATH:${JCC_HOME}/classes/db2jcc_javax.jar                
    CLASSPATH=$CLASSPATH:${JCC_HOME}/classes/db2jcc_license_cisuz.jar        
    CLASSPATH=$CLASSPATH:${JCC_HOME}/classes/sqlj4.zip                       
    export CLASSPATH=$CLASSPATH                                              
    java com.ibm.db2.jcc.DB2Binder -url jdbc:db2://1.2.3.4:5555/LOCATION \  
       -user USERNAME -password XXXXXXXX   \              
             -action replace                                                 



    ------------------------------
    Steve Johnson
    ------------------------------



  • 9.  RE: -805/51002 error connecting to z/OS from LUW tools

    Posted 19 days ago

    Charles, implicit in the error you are getting is the use of non cmod interfaces to the z/OS DB2 CMOD databases. Using DBVisualizer , IBM's Data Studio, you will need to download the ibm data server support software for windows or linux clients. The Jar files then, defined in DBViz properties file can be used. They use the nullid packages. Again , you want to access the databases directly in dbviz and not through CMOD supplied interfaces? The jdbc and odbc connections go through the db2 Dist address space. The  -805 occurs because the programs behind the nullid packages have been modified and therefore rebinds are necessary. However, your DB2 z/OS DBA should know this.  He simply needs to run the rebinds as explained. There is even an example job in the sdsnsamp pds delivered with DB2.

    It starts getting a bit tricky, depending on the levels od the DBViz and Data Studio software being used. Also, if access is through a secure port , you will need an ssl certificate known to DBViz in the properties file. 



    ------------------------------
    David Evans
    Fehraltorf
    +41 79 632 0447
    ------------------------------