I have a shell script that is run as root. Script rins ok until the point where it have to switch to user "mqm" to run other commands. It just hangs at the point of this line in the script
su - mqm -c "dspmq"
I ran the same commands at the terminal and they run fine.
Please show us the entire script (in CODE tags). And, show us (in CODE tags) how you invoke the script.
What operating system and shell are you using?
The behavior you are describing is frequently caused by mismatched quotes within a script or something else that we can't determine by seeing the line in the script where it becomes obvious that something has gone wrong.