Bob, You're actually trying too hard: your macro should just look at QUEUED() and see if there's something stacked.
This is a crude example, because you probably want to do more than just a "LOCATE *" for a M (like EXTRACT /SCREEN and divide by 2, then make it 'COMMAND * -'n or some such), but: /**/ if queued() > 0 then pull op else op = '' if abbrev('MAX', op, 1) then 'COMMAND LOCATE *' else 'COMMAND FORWARD' op BTW, are you trying to do an SPF-ish environment in XEDIT? If so, please contact me off-list -- I'd be interested in helping. Not that I think SPF is better*, but I understand that the fingers get trained (now that I'm doing z/OS, I find myself doing FIND instead of / in XEDIT and KEDIT sometimes!), and it's been something that folks have talked about for a long time. ...phsiii * Insert religious editor war here -----Original Message----- Bob <mvs...@gmail.com> Subject: XEDIT Macro and Command Line Input I'm struggling trying to write an XEDIT macro and hoping someone can help= me=20 over a tiny stumbling block. I want a pfkey set to a macro. ie. SET PF6 BEFORE MACRO SCROLL And I want to be able to accept an *optional* command line parameter. If there is always a command line parameter I seem to be able to use "READ CMDLINE" to get it. However, this does not seem to work=20 when there is no command line parameter at all. I just get hung at the "READ CMDLINE" until I hit <enter>. Also, when there is a parameter I not only what to read it, but I want to "consume" it so that it is no longer on the command line after my macro. Is there a way to do this?