View previous topic :: View next topic |
Author |
Message |
prog_mario Beginner
Joined: 08 Sep 2007 Posts: 86 Topics: 27
|
Posted: Wed May 04, 2011 1:36 pm Post subject: Package authority from SySIBM tables |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed May 04, 2011 3:37 pm Post subject: |
|
|
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 |
|
|
prog_mario Beginner
Joined: 08 Sep 2007 Posts: 86 Topics: 27
|
Posted: Thu May 05, 2011 7:30 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu May 05, 2011 10:30 am Post subject: |
|
|
prog_mario,
Did you check the STMT column in SYSIBM.SYSPACKSTMT table which stores the actual sql?
Kolusu |
|
Back to top |
|
|
prog_mario Beginner
Joined: 08 Sep 2007 Posts: 86 Topics: 27
|
Posted: Thu May 05, 2011 11:34 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu May 05, 2011 11:53 am Post subject: |
|
|
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 |
|
|
prog_mario Beginner
Joined: 08 Sep 2007 Posts: 86 Topics: 27
|
Posted: Thu May 05, 2011 11:59 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu May 05, 2011 2:12 pm Post subject: |
|
|
prog_mario,
Time to talk to your DBA/systems programmer
Kolusu |
|
Back to top |
|
|
prog_mario Beginner
Joined: 08 Sep 2007 Posts: 86 Topics: 27
|
Posted: Thu May 05, 2011 2:23 pm Post subject: |
|
|
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 |
|
|
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Fri May 06, 2011 4:10 am Post subject: |
|
|
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 |
|
|
|
|