I don't have to write code for every single command... I do have that code already and it is based on regular expressions which is just generic (it runs already for several years on my "fake command line", the only issue is that I need to keep the user on that one).
So I don't understand why I would need to write stub code for individual commands... all I need is the string that is entered on the command line...
I wonder if the exit program would allow me to register thousands of entries for every single command on the system (I don't think I can specify *ALL/*ALL on it).
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Buck Calabro <kc2hiz@xxxxxxxxx>
Sent: Monday, August 29, 2016 15:43
Subject: Re: Replace command processor
There's no shortcut. You'll need to write code for every command
anyway, whether you run a Man In The Middle command processor, replace
QCMDEXEC (and its S/38 equivalent), or modify the system entry point
I wouldn't recommend copying every command into a library above
QSYS. OS upgrades become very painful. And by upgrade, I also mean PTFs.
If I were tasked with this, I'd write a code generator that would:
DSPOBJD *ALL/*ALL *CMD
Pass through that list
Generate stub code to create the exit program for each command
Register each command
Test each command to make sure it still works
- a test suite will be invaluable
You could keep up to date with new commands by running this generator
periodically. If that seems like a lot of work, consider that the
system architecture is intentionally designed to make this design
pattern difficult to implement.
Visit wiki.midrange.com and register for an account. Edit a page that
helps you, and because it's public, you'll help someone else, too!
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.