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 JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


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