Automic Workload Automation

  • 1.  SQL agent and DB2 for z/OS

    Posted Apr 11, 2014 05:16 AM

    We are trying to set up a Database Agent to connect to DB2 on z/OS.

    Should it work? I was not able to find much documentation specific to using the Database Agent with DB2, and none at all related to using the agent with DB2 for z/OS.




  • 2.  SQL agent and DB2 for z/OS
    Best Answer

    Posted Apr 11, 2014 02:20 PM

    The v10 Documentation it only shows DB2 on Win/Unix.

    Unfortunately, I'm not too familiar with DB2 on z/OS. The DB Agent uses a JDBC connection to the database, so it might still work if you can connect via JDBC to DB2 on z/OS. What type of errors are you getting?


    gx10749qxdr2.pnghttps://us.v-cdn.net/5019921/uploads/editor/ka/gx10749qxdr2.png" width="1200">



  • 3.  SQL agent and DB2 for z/OS

    Posted Apr 14, 2014 03:42 AM

    In theAdministration Guide, under the section Installing the Agent for Databases,I found the following instructions:

    DB2

    The JDBC driver is part of the DB2 installation. It is available in the directory SQLLIB/java (under Windows: C:\Program Files\IBM\SQLLIB\java).

    Copy the following two files to the Agent's JDBC directory:
    • db2jcc.jar (JDBC Type 4 Driver)
    • db2jcc_license_cu.jar (Server license)

    The JDBCdrivercan be downloaded from IBM's homepage.
    Click on the entry "DB2 Personal Developers Edition: Re-distributable JDBC Type 4 Driver."

    I followed these instructions, and copied the two JAR files into the SQL agent’s jdbc directory. I then restarted the agent.

    When I define an SQL job that uses this agent, I can retrieve a list of tables from the DB; so I know that the agent is working, and that the login object contains valid credentials. However, when I attempt to run an SQL query job, I see the following error message:

    4/14/2014 9:17:40 AM -  U0010002 Include 'HEADER.' not found in object 'UC0.SQL.JOB.1', line '00005'.
    I’m guessing this is an internal UC4 error related to the HEADER include object(s). As far as I can tell, there is no user include for SQL jobs — only the standard HEADER.SQL object in client 0.



  • 4.  SQL agent and DB2 for z/OS

    Posted Apr 14, 2014 05:02 AM

    I started up a duplicate of the agent in -service mode, and was able to execute the SELECT statement successfully via an SEC_SQL VARA object.

    The error message suggests that the Automation Engine is searching for the wrong JOBI. It should be looking for

    HEADER.SQL
    but instead it is looking for
    HEADER.
    The problem appear to be happening during the phases where the name of the header job include object is built. I noticed that the platform is missing for this agent.

    2cr0p6cgjz0w.pnghttps://us.v-cdn.net/5019921/uploads/editor/42/2cr0p6cgjz0w.png" width="746">
    Any ideas?


  • 5.  SQL agent and DB2 for z/OS

    Posted Apr 14, 2014 07:43 AM

    My colleague figured it out. I had mistakenly commented out or removed these lines from the agent’s INI file:

     

    [VARIABLES]
    UC_HOST_JCL_VAR=SQL