Below is the output from a db2 reorg command.
DB20000I The REORG command completed successfully.
I am trying to grab the return code(DB20000I) to check for succees or failure.
I need to use this output to send alerts if it fails.
How do I store just the return code in a variable.
I am using the below command but it's just printing the return code.
db2 "reorg table <table>"|awk '{print $1}'
Thanks in advance.