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 read the db2 table space status using rexx command

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

New User


Joined: 17 Jun 2010
Posts: 75
Location: Chennai

PostPosted: Fri Apr 17, 2015 2:29 am    Post subject: How to read the db2 table space status using rexx command
Reply with quote

Hi All,
I have a requirement to check all the tablespaces status of database.the objective is , if we given database name as a input and it should reply the status of table space under the database.
then I validate and write results TRUE ,if all the tablesspace status is RW.
Else i should write FALSE,If any one of tablespaces status is COPY,STOP.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1925
Location: UK

PostPosted: Fri Apr 17, 2015 5:59 pm    Post subject:
Reply with quote

Well, you cannot with a 'Rexx command' - whatever that is. But you could possibly run the required commands via Rexx using the Rexx/DB2 interface as documtned in the SQL user guide.
Back to top
View user's profile Send private message
farhad_evan

New User


Joined: 30 Aug 2014
Posts: 24
Location: UK

PostPosted: Wed Apr 22, 2015 10:41 am    Post subject:
Reply with quote

hi
if you want run DB2 command in rexx you can use this :
Code:
/*rexx*/                                                             
 ADDRESS(TSO)                                                       
 Y = OUTTRAP(DB2CMD.,"*","NOCONCAT")                                 
 QUEUE "-DIS DB(******) SPACENAM(*******) LIMIT(*)"/*DB2 COMMAND */ 
 QUEUE "END"                                                         
 "DSN SYSTEM(****)"  /*DB2 SYSTEM NAME*/                             
 Y = OUTTRAP("OFF")                                                 
 ADDRESS(ISPEXEC)                                                   
 DO I = 1 TO DB2CMD.0                                               
 SAY DB2CMD.I                                                       
 END                                                                 
Back to top
View user's profile Send private message
cmsmoon

New User


Joined: 17 Jun 2010
Posts: 75
Location: Chennai

PostPosted: Fri Apr 24, 2015 2:32 am    Post subject: Reply to: How to read the db2 table space status using rexx command
Reply with quote

Hi farhad

Thank you so much !!!
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 OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts Rexx to send an email without SMTP Se... upendrasri All Other Mainframe Topics 9 Sun Nov 19, 2017 7:59 pm
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
No new posts REXX LISTDSI () SMSINFO is not working upendrasri CLIST & REXX 4 Fri Nov 17, 2017 11:33 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 4 Wed Nov 15, 2017 4:27 pm

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