Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Source of Stored procedure.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue Jul 26, 2011 3:37 pm    Post subject: Source of Stored procedure.
Reply with quote

Hi,

As SYSIBM.SYSROUTINES table contains a row for each routine defined in the system. Mostly the routines are written in SQL or COBOL.

My question is where we can see the source code of the routines?
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jul 26, 2011 3:43 pm    Post subject:
Reply with quote

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.sqlref/zrout.htm
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue Jul 26, 2011 4:16 pm    Post subject:
Reply with quote

Thanks for the reply peter. The table - SYSIBM.SYSROUTINES doesnt contain the Source code for the routines. There is another catalog table - SYSIBM.SYSROUTINES_SRC. But it does not contain source code for all the routines. According to the manual - "SYSIBM.SYSROUTINES_SRC table
Contains source for generated routines, such as those created by DB2 UDB for z/OS Procedure Processor DSNTPSMP". We are using DB2 V8 for Zos.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Jul 27, 2011 3:09 pm    Post subject:
Reply with quote

No one is replying... icon_sad.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7231

PostPosted: Wed Jul 27, 2011 3:24 pm    Post subject:
Reply with quote

Good spot...

Patience is a virtue.

PS. I have no idea myself.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Jul 27, 2011 3:59 pm    Post subject:
Reply with quote

http://www.ibm.com/developerworks/data/library/techarticle/dm-0602rielau/
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Jul 27, 2011 5:32 pm    Post subject:
Reply with quote

Still not clear... Want to know which catalog table stores the source_code for the DB2 stored procedure...
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Wed Jul 27, 2011 7:23 pm    Post subject:
Reply with quote

column text in SYSIBM.SYSROUTINES
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Wed Jul 27, 2011 7:25 pm    Post subject:
Reply with quote

Is the SP coded in SQL or in an external programming language?

If coded as an SQL procedure the source should be in SYSROUTINES_SRC.

If coded as COBOL or other programming language the source will likely be in whatever source library is used by your shop.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Jul 27, 2011 7:26 pm    Post subject: Reply to: Source of Stored procedure.
Reply with quote

Quote:
Want to know which catalog table stores the source_code for the DB2 stored procedure...


I hope You realize that for odd requests not getting answers is pretty normal

remember...
replying is
on voluntary base
on our own time
the interest of the question asked
the knowledge/experience to provide a good reply

in this case most probably the last 2 apply
if You are really intereste better start searching Yourself
starting from ( for example ) here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQK15/7.7?SHELF=DSNSHKA3&DT=20081120084907

Quote:
7.7.74 SYSIBM.SYSROUTINES table
7.7.75 SYSIBM.SYSROUTINESTEXT table
7.7.76 SYSIBM.SYSROUTINES_OPTS table
7.7.77 SYSIBM.SYSROUTINES_SRC table

might be tables worth investigating
Back to top
View user's profile Send private message
tp70227

New User


Joined: 20 Nov 2009
Posts: 3
Location: Hyd

PostPosted: Mon Aug 08, 2011 8:38 pm    Post subject: Reply to: Source of Stored procedure.
Reply with quote

Hi,

check in BMC tool with type as PR and give the name of the stored procedure. IF bmc give you information then give "DDL" in the cmnd and it will take you to the defination of the stored procedure. Sometimes some company write stored procedure as cobol db2 batch module and so check in your changeman or whtever you are using for the source.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue Aug 09, 2011 11:10 am    Post subject:
Reply with quote

Thanks everyone...
Back to top
View user's profile Send private message
apvardhini

New User


Joined: 23 Apr 2009
Posts: 20
Location: India

PostPosted: Tue Oct 07, 2014 3:15 pm    Post subject: Reply to: Source of Stored procedure.
Reply with quote

Hi, when we download from BMC or create native sql stored procedure through SPUFI, the Sp is not indented properly. Why is it so and what is the workaround?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Tue Oct 07, 2014 6:35 pm    Post subject:
Reply with quote

apvardhini,
Please start a new topic instead of adding onto a 3-yr old one.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
This topic is locked: you cannot edit posts or make replies. Stored procedure on Federated thru DB2 arif677 DB2 6 Tue May 31, 2016 11:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us