Hi Chris,

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.

Kind regards,
Paul
________________________________________
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:
?Hi,


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.

Kind regards,
Paul

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.
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/rbam6/wrppg.htm

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:
http://code.midrange.com/35edc13a37.html). 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
this).

(1) This makes writing a CL source member interpreter trivial:
http://brilligware.com/cp0050.html

Hope some of the above is useful.

Chris Pando
chris@xxxxxxxxx
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,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].