Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2445
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: 7314

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: 2445
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: 1281
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: 659
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: 10374
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: 1249
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 How to Extract BMS Marco Source from ... Howard Hinman CICS 5 Tue Oct 31, 2017 11:13 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us