IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can not find SQL statement of package in sysibm.syspackstmt


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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.
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
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.
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Discrepancy b/w SYSIBM tables and BMC... DB2 0
No new posts How to find orphaned MCDS D records. JCL & VSAM 15
No new posts SYSIBM Tables Query DB2 8
No new posts DFDSS COPY using Filter REFDT statement JCL & VSAM 2
No new posts compare two file to find position/dat... SYNCSORT 2
Search our Forums:

Back to Top