MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Package authority from SySIBM tables

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
prog_mario
Beginner


Joined: 08 Sep 2007
Posts: 86
Topics: 27

PostPosted: Wed May 04, 2011 1:36 pm    Post subject: Package authority from SySIBM tables Reply with quote

Hi everybody,
I need to retrieve table name, plan/package, and, which actions that plan/package runs against the table (insert, update, select, delete, etc), from SYSIBM tables.
Can anyone give me some help on which tables I need to join to obtain that information?
Thanks
_________________
The more I learn, the more I want to learn.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed May 04, 2011 3:37 pm    Post subject: Reply with quote

prog_mario,

I would start with

SYSIBM.SYSPACKAGE table for package and table name which is stored in QUALIFIER column
SYSIBM.SYSPACKSTMT table for the actual statement which is stored in the column STMT
Back to top
View user's profile Send private message Send e-mail Visit poster's website
prog_mario
Beginner


Joined: 08 Sep 2007
Posts: 86
Topics: 27

PostPosted: Thu May 05, 2011 7:30 am    Post subject: Reply with quote

Hi Kolusu,
I took a look at both tables but I still didn't find the columns I need.
The information I need is based on the PA (package authority) that we can check using BMC utility:
Code:

SY29 R ------------  TABLE AUTHS FOR PLANS AND PACKAGES LIST  ----- ROW 1 OF 3 
Command ===>                                                  Scroll ===> CSR   
                                                                            02 
CMD will show commands for this list.  Type command and press ENTER             
LISTS: AL CL CO DB DS FK IC IM IS IX KC MX PA PK PL RI SG SY TM TS TT UA US VW 
QUALIFIER: TABLE=SYSADM.PICCS_CYCSUM_TBL                                       
                                                               U A D I I S U R 
 Table                        Type Plan/Pkg Collid             C L E X S T P F 
----v----1----v----2----v----3----v----4----v----5----v----6----v----7----v----
 SYSADM.PICCS_CYCSUM_TBL           PI0044O  SYSADM                       Y     
 SYSADM.PICCS_CYCSUM_TBL           PI0045O  SYSADM                       Y     
 SYSADM.PICCS_CYCSUM_TBL           PI0045O  SYSADM                       Y     
******************************  BOTTOM OF DATA  *******************************


At the top right side of the screen we have some "Y" indicating if the plan inserts, updates or something, and I still didn't identify the columns that contain those information at SYSIBM tables.
_________________
The more I learn, the more I want to learn.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu May 05, 2011 10:30 am    Post subject: Reply with quote

prog_mario,

Did you check the STMT column in SYSIBM.SYSPACKSTMT table which stores the actual sql?

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
prog_mario
Beginner


Joined: 08 Sep 2007
Posts: 86
Topics: 27

PostPosted: Thu May 05, 2011 11:34 am    Post subject: Reply with quote

Yes,
with HEX OFF
Command ===> Scroll ===> CSR
STMT [code:1:342c208f7e]
---------+---------+---------+---------+---------+---------+---------+---------+
.................+..&...................
.................+..&...................
.................+..&...................
.................+..&...................
.......M...<......|..
_________________
The more I learn, the more I want to learn.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu May 05, 2011 11:53 am    Post subject: Reply with quote

prog_mario,

The data from sysibm tables is is stored in UNICODE UTF-8 format. In order to view it in EBCDIC format you need to use the ISPF DISPLAY command

Once you get the results from the query in spufi, simply enter the DISPLAY UTF8 command at the command prompt and hit enter.

Now to get back to normal EBCDIC form enter the command DISPLAY EBCDIC

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
prog_mario
Beginner


Joined: 08 Sep 2007
Posts: 86
Topics: 27

PostPosted: Thu May 05, 2011 11:59 am    Post subject: Reply with quote

I getting an error "Terminal CCSID not set" when I try to display UTF8.
_________________
The more I learn, the more I want to learn.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu May 05, 2011 2:12 pm    Post subject: Reply with quote

prog_mario,

Time to talk to your DBA/systems programmer

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
prog_mario
Beginner


Joined: 08 Sep 2007
Posts: 86
Topics: 27

PostPosted: Thu May 05, 2011 2:23 pm    Post subject: Reply with quote

The error occurs only when I'm connected remotely. When I use a VPN it works, but, STMT doesn't have the information I need.
_________________
The more I learn, the more I want to learn.
Back to top
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Fri May 06, 2011 4:10 am    Post subject: Reply with quote

To retrieve the sorts of SQL statements a package is issuing against a table, use this query:
SELECT *
FROM SYSIBM.SYSTABAUTH
WHERE COLLID = 'your collection of the package'
AND GRANTEE = 'name of the program'
;

regards
Christian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group