Guess I've seen this before (my current fake command line is something similar)... but you need to call this new command processor yourself (for example in the initial program), it's not that it replaces QCMD by default or can even do so ?
Also if you enter for example WRKSPLF on this command processor, it offers you a new command line which is the default systems command processor... and not yours.
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Chris Pando <chris.pando@xxxxxxxxx>
Sent: Monday, August 29, 2016 23:59
To: Midrange Systems Technical Discussion
Subject: Re: Replace command processor
On Mon, Aug 29, 2016 at 6:29 AM, Paul Nicolay <paul.nicolay@xxxxxxxxxx> wrote:
I wonder if it is possible to replace the OS/400 command processor ?
I would like to be able to control the command (ie. additional verifications and/or change) before it is executed.
A replacement for QCMD? Absolutely. What does QCMD do? It attempts to
retrieve a *RQS message from the *EXT message queue. If any requests
are there, QCMD executes them(1). If the message queue does not have
any requests, the command entry screen is displayed. After a string is
typed and enter is hit, it (essentially) drops the string into a
QCMDEXC and executes it. You can do all of this yourself, inserting
whatever behavior you want, and defaulting to executing the command as
entered (essentially a giant Select, with the Other clause executing
the string). Search on writing a request-processor program.
I haven't used QCMD since it was QCL (I learned how to do all of this
from the CPF 3.0 Programmer's Guide). A stripped down bare bones
example can be found at:
). It was pointed out
elsewhere that allowing a System Request could result if falling out
to the (true) command entry screen, which would constitute a security
vulnerability - the referenced program does *not* allow this.
My command processor is considerably more complicated than the
contrived example (I've been working on it more than 30 years), but I
included the logic for 'stealth' mode (I can turn logging on and off),
and the logic for command prompting (the trickiest part of all of
(1) This makes writing a CL source member interpreter trivial:
Hope some of the above is useful.
www.brilligware.com - the home of MineSweeper5250!
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxx for any subscription related questions.