You did not say how you knew that the program was hung on a terminal
write.
It is a normal condition for an in-use device (terminal port) to show and
#O... number representing its output to that device. This does not
necessarily mean that it is a spoolfile.
If it was a spoolfile in that case, you should have also been able to see
a file by the name of O21.OUT.HPSPOOL. (i.e., do a LISTF
O21.OUT.HPSPOOL.)
Also, try the "SP" parameter on the showout command. It will filter all
output files except spoolfiles.
Regards