Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8521045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:42:16+00:00 2026-06-11T06:42:16+00:00

Techies– I’m getting sql0204 XML in *LIBL type *SQLUDT not found on an i

  • 0

Techies–
I’m getting sql0204 XML in *LIBL type *SQLUDT not found on an i db2 6.1 install when I try to deploy a stored proc I know works on Linux v9.7. The reason I am attempting to get this to work is because I really need to pass a table (or array) variable. I couldn’t find a way to send a multi-dim array to a sproc on the 6.1 v of i, so I thought I’d try getting around that with an xml doc. But that failed too… Does anyone have any advice for me on how to solve this issue?

Here’s the sproc that works on v9.7,Linux:

  CREATE PROCEDURE HCMDEV.EMP_MULTIPLE_XML (IN DOC XML)
  DYNAMIC RESULT SETS 1
  READS SQL DATA
  LANGUAGE SQL SPECIFIC EMP_MULTIPLE_XML

  P1: BEGIN

  DECLARE CSR1 CURSOR WITH RETURN FOR
    SELECT emp.EMPID,
           emp.FIRSTNAME,
           emp.LASTNAME,
           emp.DIVISION,
           emp.DISTRICT,
           emp.LOCATION,
           emp.OPERATIONALAREA,
           emp.TERMDATE,
           emp.REHIREDATE,
           emp.HIREDATE,
           emp.ADDRESSLINE1,
           emp.ADDRESSLINE2,
           emp.CITY,
           emp.STATE,
           emp.ZIPCODE,
           emp.TELEPHONE1,
           emp.POSITIONCODE,
           emp.POSITIONTITLE,
           emp.HIRECODE
        FROM HCMDEV.EMPLOYEE emp
         WHERE EMP.EMPID IN
          (SELECT X.EMPID
           FROM XMLTABLE('$d/EMPLOYEE/EMPID' PASSING DOC AS "d" COLUMNS EMPID CHAR(9) PATH '.') AS X);

  OPEN CSR1;
  END P1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:42:17+00:00Added an answer on June 11, 2026 at 6:42 am

    For those following this thread, xmltable is NOT available until V7R1. The workaround is to create a stored proc that accepts as the IN paramater a CLOB datatype. In my case, I pass a long string with commas to separate the values for the empid. That works just fine.
    Here’s a sampling:

     CREATE PROCEDURE HCMDEV.EMP_MULT (IN emp_array CLOB(2M))
     DYNAMIC RESULT SETS 1
     READS SQL DATA
     LANGUAGE SQL SPECIFIC EMP_MULT
     P1: BEGIN
    -- #######################################################################
    -- # Returns specific employees based on incoming clob array
    -- #######################################################################
    
    
    DECLARE v_dyn varchar(10000);
    DECLARE v_sql varchar(10000);
    
    DECLARE cursor1 CURSOR WITH RETURN FOR v_dyn;
    
    SET v_sql = 
      'SELECT
         emp.EMPID,
         emp.FIRSTNAME,
         emp.LASTNAME
         FROM HCMDEV.EMPLOYEE emp
          WHERE emp.EMPID IN (' || emp_array || ')';
    
       PREPARE v_dyn FROM v_sql;
    
       OPEN cursor1;
    

    END P1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to provide a browser page to help non-techies run the various tests
I am having a hard time getting started with some way to visualize some
I need to explain to a not-very-technical manager the MVC (model-view-controller) concept and ran
Being a softie, I'm currently fighting some hardware techies on a hardware detection mechanism.
For example if I have a web page HTML like below <body> Hello Techies,
Hai Techies, in C#, how can we define the multicast delegate which accepts a
I understand this is purely a coding related forum, but i believe techies can
It's pretty hard for non-techies to find which key to hit so their PC
Ok, my question's not as broad as it seems, to summarize 8 months effort
I'm not sure if this is a programming question, or would be better served

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.