Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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 CALL statement in COBOL for VSE Kirthishine COBOL Programming 1 Fri Jun 26, 2020 12:12 pm
No new posts ISPF skeleton that has IF/THEN/DO sta... ecsk TSO/ISPF 15 Mon Apr 27, 2020 12:52 pm
No new posts Java Batch launcher JVMPRC86 does not... harisukumaran IBM Tools 2 Wed Apr 15, 2020 12:37 am
No new posts Usage of pre-processor statement in p... Sakthidevi PL/I & Assembler 1 Thu Nov 28, 2019 4:08 pm
No new posts Usage of Like statement in PL/I Sakthidevi PL/I & Assembler 3 Fri Nov 15, 2019 11:22 pm

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