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
 
How to find storage group related to dataset name

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ahmad

New User


Joined: 18 Oct 2008
Posts: 13
Location: Iran

PostPosted: Sun Nov 11, 2012 6:00 pm    Post subject: How to find storage group related to dataset name
Reply with quote

hi guys
consider that I have name of the dataset like 'DB9CAT.DSNDBD.BANK.TSPAGE.I0001.A009'
and i want to find it's related storage group in db2. i've already serached SYSxxxxxxs on DSNDB06 CATALOG TABLES but found nothing useful.
also my final goal is finding all volumes assigned to that desired storage group.

I'll appreciate your help.
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1258
Location: Israel

PostPosted: Sun Nov 11, 2012 9:09 pm    Post subject: Reply to: How to find storage group related to dataset name
Reply with quote

Check these Catalog Tables for partial answer:
Table SYSSTOGROUP contains one row for each DB2 storage group.
Table SYSVOLUMES contains one row for each volume of each storage group.

Edit:
Table SYSDATABASE has a column 'STGROUP' which contains the default storage group of the database.
Back to top
View user's profile Send private message
ahmad

New User


Joined: 18 Oct 2008
Posts: 13
Location: Iran

PostPosted: Mon Nov 12, 2012 9:33 am    Post subject:
Reply with quote

thanks marso
but I'v already searched those tables and didn't find any relation between SYSTABLESPACE and SYSSTOGROUP which help me to find for example 'storage group of table space named TSPAGE' .
as you know in db2 panels if you put S command beside table name it'll show you it's table space name and if you put G beside that table space name it'll return it's Storage group name. I want to extract that kind of information.

well,I'm waiting for more...

and you mentioned SYSDATABASE, in my environment database designs some TSs are in default storage group of that data base but some of them have their own SG, so SYSDATABAE couldn't be so helpful in my case.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Nov 12, 2012 10:34 am    Post subject:
Reply with quote

Hi Ahmad,

Quote:
DB9CAT.DSNDBD.BANK.TSPAGE.I0001.A009


So your,
database = BANK
Tablespace= TSPAGE
Partition = 9

to find storage group name, run the below query
Code:
select dbname, tsname, STORNAME
from sysibm.systablepart
where dbname = 'BANK'
and TSNAME = 'TSPAGE'
--and PARTITION = 9
;

Use the above storagegroup name result in the below queries,
Code:
select sgname ,volid from sysibm.sysvolumes
where sgname = ' ' --<-- Type in Storage Group name
;
select name, vcatname, space, dataclas, mgmtclas, storclas
from sysibm.sysstogroup
where name = ' ' --<-- Type in Storage Group name
;


thanks,
Sushanth
Back to top
View user's profile Send private message
ahmad

New User


Joined: 18 Oct 2008
Posts: 13
Location: Iran

PostPosted: Mon Nov 12, 2012 10:54 am    Post subject:
Reply with quote

thanks a lot sushanth bobby

that query will do the trick ;)
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 Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts INSUFFICIENT VIRTUAL STORAGE!! Vignesh Sid SYNCSORT 1 Thu Dec 28, 2017 3:45 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm

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