View previous topic :: View next topic
|
Author |
Message |
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
farhad_evan
New User
Joined: 30 Aug 2014 Posts: 24 Location: UK
|
|
|
|
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 |
|
|
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
Hi farhad
Thank you so much !!! |
|
Back to top |
|
|
|