Formatting output using awk in ksh

:oi was trying to write a script to format output of a command in ksh which has output as below:

so i used :

to get

which i require at all times. But problem occurs when status part changes. above output i get when status is SU (success).If the status is IN (inactive), output of command is:

and if status is RU (running), output of command is

and if status is AC (activated), output of command is

the awk construct that i use is ok for SU status, i need an awk construct that gives similar output for all status. Something like :

or

or

or

i got my construct to work with th SU status alone, i wanted to have one single awk construct that handles all the status. Can someone help me in the code ?

Can you paste a sample output of the command in ksh. It would help if we can understand the input data that awk should work on, to provide correct solution.