If you are trying to execute MACRO, then don't use TSO prefix before command. When you are in editing/viewing dataset/member, just type your macro name on the command line.
I don't know much about your style of writing but the following works for me-
/* REXX */
"ISREDIT MACRO (STRING)"
WHEN STRING='TEST' THEN
Do somehing else
Suppose I stored it in a member TSTMAC of my ISPMLIB then just type
TSTMAC TEST at the command line