0

I'm wondering if there is a package construct in DB2 like in Oracle.

For DB2 I found stored procedures and functions.

In Oracle one could group several stored procedures and functions together in a package. Is there something similar in DB2? I know one can enable some Oracle compatibility, however we should be using IBM stuff here.

I found an older article on DB2 packages however this seems to relate to a totally different concept. It seems to be more about integrating third party libraries and doing the coding outside of the database with different programming languages.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Udo Held
  • 12,314
  • 11
  • 67
  • 93

2 Answers2

0

It appears that there are packages in DB2.

Here's a link to the IBM manual section on packages.

Here's a link to the IBM manual section on IBM's SQL procedural language, which you can use in SQL procedures.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
  • This are Oracle PL/SQL packages where DB2 is emulating an Oracle DB. That is what I ment with "Oracle compatibility". – Udo Held Aug 10 '12 at 17:02
  • @Udo Held: The DB2 link you provided in your question pointed to the PL/SQL section of the IBM manual. That's why I assumed you could use IBM's PL/SQL. I've added a link to IBM's SQL procedural language in my answer. – Gilbert Le Blanc Aug 10 '12 at 17:15
0

DB2 has modules, which are equivalent to Oracle packages.

When using Oracle compatibility within DB2, the CREATE PACKAGE statement DB2 will create a module.

Ian Bjorhovde
  • 10,916
  • 1
  • 28
  • 25