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
 
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 RACF- How to find the Last access of ... rahul shanmuganatan All Other Mainframe Topics 7 Thu Jun 21, 2018 3:19 pm
No new posts SYSIBM Catlog tables to see DDL chang... rakesh17684 DB2 0 Fri Jun 08, 2018 3:43 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts Compute statement with Cobol Z/os 5.2 Chetan Kumar COBOL Programming 2 Fri May 11, 2018 8:02 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am

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