Unix Technical Forum

DB2 7.2 Z/OS - Functions - Where's the Function source text stored

This is a discussion on DB2 7.2 Z/OS - Functions - Where's the Function source text stored within the DB2 forums, part of the Database Server Software category; --> Hi All, I've defined a few functions to DB2. I can see the entries in SYSIBM.SYSROUTINES - but where ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 02:29 AM
wfs
 
Posts: n/a
Default DB2 7.2 Z/OS - Functions - Where's the Function source text stored

Hi All,

I've defined a few functions to DB2.

I can see the entries in SYSIBM.SYSROUTINES - but where is the source
text stored.

I want to reverse engineer the definitions.


Thanks

Bill


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 02:29 AM
Knut Stolze
 
Posts: n/a
Default Re: DB2 7.2 Z/OS - Functions - Where's the Function source text stored

wfs wrote:

> Hi All,
>
> I've defined a few functions to DB2.


Functions with LANGUAGE SQL or an external programming language like C/C++
or Java?

For language SQL functions you might want to look at SYSCAT.ROUTINES.TEXT.

> I can see the entries in SYSIBM.SYSROUTINES - but where is the source
> text stored.


You should not use the internal, undocumented tables but rather the catalog
view SYSCAT.ROUTINES. The reason being that the internal tables might
change at any time - the external interface is much more stable.

> I want to reverse engineer the definitions.
>
>
> Thanks
>
> Bill


--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 02:30 AM
wfs
 
Posts: n/a
Default Re: DB2 7.2 Z/OS - Functions - Where's the Function source text stored

Thanks

Bill

(I'll check it out when I'm back at work)


"Knut Stolze" <stolze@de.ibm.com> wrote in message
news:cpu8eh$3qi$1@fsuj29.rz.uni-jena.de...
> wfs wrote:
>
>> Hi All,
>>
>> I've defined a few functions to DB2.

>
> Functions with LANGUAGE SQL or an external programming language like C/C++
> or Java?
>
> For language SQL functions you might want to look at SYSCAT.ROUTINES.TEXT.
>
>> I can see the entries in SYSIBM.SYSROUTINES - but where is the source
>> text stored.

>
> You should not use the internal, undocumented tables but rather the
> catalog
> view SYSCAT.ROUTINES. The reason being that the internal tables might
> change at any time - the external interface is much more stable.
>
>> I want to reverse engineer the definitions.
>>
>>
>> Thanks
>>
>> Bill

>
> --
> Knut Stolze
> Information Integration
> IBM Germany / University of Jena



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 02:30 AM
Knut Stolze
 
Posts: n/a
Default Re: DB2 7.2 Z/OS - Functions - Where's the Function source text stored

wfs wrote:

> Thanks
>
> Bill
>
> (I'll check it out when I'm back at work)


Oops, I just saw that you're on z/OS - things might be different there.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 02:30 AM
Dave Hughes
 
Posts: n/a
Default Re: DB2 7.2 Z/OS - Functions - Where's the Function source text stored

On 2004-12-17, Knut Stolze scribbled:

>wfs wrote:
>
>> Thanks
>>
>> Bill
>>
>> (I'll check it out when I'm back at work)

>
>Oops, I just saw that you're on z/OS - things might be different
>there.


I've got access to a DB2 z/OS instance (v7.1.1), and from what I can
see the catalog tables are considerably different to UDB:

* The SYSCAT schema doesn't exist (well, I can see one, but there's
only one table in it called PROCEDURES).
* In the SYSIBM schema, there is a SYSROUTINES tables but I can't see
any columns which contain the source text (there's things like
JAVA_SIGNATURE, PARM_SIGNATURE, lots of PARMn columns, REMARKS, RUNOPTS
and EXTERNAL_NAME, but no TEXT column).

I've had a look at some of the other tables in the SYSIBM schema
(unfortunately I don't have SELECT access on all of them), but I think
you might be out of luck on this one.

Dave.
--
Cogito cogito ergo cogito sum
-- Ambrose Bierce
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 02:30 AM
wfs
 
Posts: n/a
Default Re: DB2 7.2 Z/OS - Functions - Where's the Function source text stored

Hi All,

The procedure definition doesn't appear to be stored in
SYSIBM.SYSROUTINES, just parts of the definition.

If I use BMC, it displays the function as I defined it.


CREATE FUNCTION AAA.WFS_S_1
(X FLOAT)
RETURNS SYSIBM.DOUBLE
SPECIFIC AA.WFS_S_1
LANGUAGE SQL
DETERMINISTIC
CALLED ON NULL INPUT
CONTAINS SQL
EXTERNAL ACTION
RETURN
SIN(X)/COS(X)

Maybe I'll count all the rows in all catalog tables, create a new
function, count all rows again, and see which ones have changed.....


Bill


"Dave Hughes" <dave_nospam@waveform.plus.com> wrote in message
news:xn0dr4ko6j9nlm2000@usenet.plus.net...
> On 2004-12-17, Knut Stolze scribbled:
>
>>wfs wrote:
>>
>>> Thanks
>>>
>>> Bill
>>>
>>> (I'll check it out when I'm back at work)

>>
>>Oops, I just saw that you're on z/OS - things might be different
>>there.

>
> I've got access to a DB2 z/OS instance (v7.1.1), and from what I can
> see the catalog tables are considerably different to UDB:
>
> * The SYSCAT schema doesn't exist (well, I can see one, but there's
> only one table in it called PROCEDURES).
> * In the SYSIBM schema, there is a SYSROUTINES tables but I can't see
> any columns which contain the source text (there's things like
> JAVA_SIGNATURE, PARM_SIGNATURE, lots of PARMn columns, REMARKS, RUNOPTS
> and EXTERNAL_NAME, but no TEXT column).
>
> I've had a look at some of the other tables in the SYSIBM schema
> (unfortunately I don't have SELECT access on all of them), but I think
> you might be out of luck on this one.
>
> Dave.
> --
> Cogito cogito ergo cogito sum
> -- Ambrose Bierce



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 02:31 AM
Walter Schneider
 
Posts: n/a
Default Re: DB2 7.2 Z/OS - Functions - Where's the Function source text stored

Hello,

in DB2 z/OS V7.1 there are two additional catalog tables containing the
information you are looking for:

SYSIBM.SYSROUTINES_SRC
SYSIBM.SYSROUTINES_OPTS

If you can't find them, your system is not V7.1, or your system admin did
not the complete installation/migration.

Cheers - Walter.
"wfs" <wfs4@optonline.net> schrieb im Newsbeitrag
news:kolwd.2475$W%6.1860@fe11.lga...
> Hi All,
>
> I've defined a few functions to DB2.
>
> I can see the entries in SYSIBM.SYSROUTINES - but where is the source
> text stored.
>
> I want to reverse engineer the definitions.
>
>
> Thanks
>
> Bill
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:55 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com