Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009
    Posts
    0

    Unanswered: Request to know if Arrays can be defined as input for DB2 Version 8.1 - SQL Procedure

    Dear Techies,

    We have a requirement to write a Pure DB2 SQL stored procedure which takes arrays as input. The current version of DB2 we have on Z/OS is 8.1

    Please tell if ‘DB2 version 8.1 on Z/OS’ can handle arrays as inputs/outputs via a Stored Procedure
    If yes, can you please provide the ‘syntax/sample code’ for the same.
    If No, can you please tell the first version of DB2 on Z/OS which supports it.

    Also if you get some time, please do give your observations on the below as well -
    • Is it a good practice to use arrays in the DB2-SQL SPs?
    • What are the ‘challenges/limitations’ and advantages (if any) in using arrays (how long the string can be, keywords, handling arrays within the program, inside the queries etc)
    • Are there any alternatives. (If we suggest parsing the inputs with in the SP after obtaining the input in a long string, how is this done in the SP)

    Thank You Very Much
    Abhilash Jose

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by abhilash1jose View Post
    Please tell if ‘DB2 version 8.1 on Z/OS’ can handle arrays as inputs/outputs via a Stored Procedure
    Why don't you just look it up in the manual?

    If yes, can you please provide the ‘syntax/sample code’ for the same.
    The manual will show you the syntax for that.

    If No, can you please tell the first version of DB2 on Z/OS which supports it.
    Again - you guessed it - the manual can tell you that (or the release notes)

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Quote Originally Posted by abhilash1jose View Post
    Please tell if ‘DB2 version 8.1 on Z/OS’ can handle arrays as inputs/outputs via a Stored Procedure
    The short answer is "no".

    Also if you get some time, please do give your observations on the below as well -
    • Is it a good practice to use arrays in the DB2-SQL SPs?
    Since this is a new feature in DB2 LUW, it is not yet widely used. My personal opinion is that arrays (and other features) are often used to hide a sub-optimal database design. But sometimes you need those features to get the performance you need. So the answer is really "it depends".
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •