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
 

 

Can not find SQL statement of package in sysibm.syspackstmt

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

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed Mar 11, 2015 12:00 pm    Post subject: Can not find SQL statement of package in sysibm.syspackstmt
Reply with quote

I need to check the SQL statement of a PGM . (PGM source is built by a template and very hard to see)
I bind DBRM to package then bind plan , I read the ref that the SQL should be in
column STMT of sysibm.syspackstmt , but I select the table , several rows displayed but STMT is blank . Please help.


(DB2 Version 10 NFM)
Back to top
View user's profile Send private message

mjadwani2785

New User


Joined: 28 Apr 2009
Posts: 89
Location: Noida , Dublin

PostPosted: Wed Mar 11, 2015 10:54 pm    Post subject:
Reply with quote

I beleive you are checking in wrong column in V10 NFM . The column you should be looking for is statement .

V9 NFM STMT column was there.


V10 NFM table has STMT column but blank (not given in sql ref documentation) , actual SQL text is in STATEMENT column.
http://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.sqlref/src/tpc/db2z_sysibmsyspackstmttable.dita?cp=SSEPEK_10.0.0%2F10-0-75

If you have DB2 Admin Tool , it is pretty simple . Look for package , then use line command SQ to get the sql's in the package.

Hope This Helps !!

Regards,
MJ
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Thu Mar 12, 2015 8:35 am    Post subject:
Reply with quote

mjadwani2785 wrote:
I beleive you are checking in wrong column in V10 NFM . The column you should be looking for is statement .

V9 NFM STMT column was there.


V10 NFM table has STMT column but blank (not given in sql ref documentation) , actual SQL text is in STATEMENT column.
http://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.sqlref/src/tpc/db2z_sysibmsyspackstmttable.dita?cp=SSEPEK_10.0.0%2F10-0-75

If you have DB2 Admin Tool , it is pretty simple . Look for package , then use line command SQ to get the sql's in the package.

Hope This Helps !!

Regards,
MJ


Thank you MJ.

I found the column statement and it's a CLOB column and content like below

STATEMENT STMTBLOB
-------------------- -------------
CLOB(2097152) BLOB(2097152)
CLOB(2097152) BLOB(2097152)
CLOB(2097152) BLOB(2097152)

I read the ref , there's a auxiliary table called : SYSIBM.SYSPACKSTMT_STMT , but I can not select it. the message said , the auxiliary can not be queried directly , so I use CAST to convert the statement into varchar and displayed successfully icon_smile.gif
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 ERM-Diagram of SysIBM-Catalog-Tables Auryn DB2 2 Fri Feb 17, 2017 6:22 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm


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