The answer to your question is “many and varied”. I don’t think there’s a definitive list, but usually commands that return values won’t work with QCMDEXEC (or any other execution method).
When you create a command (using the CRTCMD command) one of the parameters is ALLOW() which lets you define which modes a command can run in, for example Interactive, Batch, Interactive Program, Batch Program, etc.
If you use the DSPCMD (Display COmmand) on a command you will be able to see which modes it will run in.
Hope it helps