Got my EVENTHUB macro working (well stable) at last to make MVS3.8J assembler coding a little easier.
One simple macro (well almost 1000 lines now, but for a user to use a simple macro interface) to pretty much let a complete S/370 assembler novice use the COMM area to accept operator commands, manage multiple outstanding WTORs, and have multiple outstanding timers queued.
Multiple timers has always been a pain under mvs3.8j as it doesn’t have the STIMERM macro used in later MVS releases… but as my solution would actually be more complicated trying to fit in stimerm probably just as well that macro doesn’t exist.
The EVENTHUB macro basic rules are call the init action (to optionally in that init call enable COMM area (operator console (P)park and (F)modify command processing); and at the end of the code call it with the dsects option to create the dsects needed.
It would also be nice if at program end it was invoked with the destroy action to cancel all outstanding events and free resources, as eventually there will need to be a freemain in the destroy function.
But once the begin (create) and end (dsects) actions are in the user code it is simply a case of the user calling the macro to add/delete as many WTORs and timers as they want, everything is done for the user until the point an event triggers and passes to the code block the user attached that event to (todo: when implementing getmain let the user pass the expected table size).
Anyway, it’s at a stable point at the moment so been pushed to github for others to hack away at.
On my site I will keep the latest development version of eventhub while I play with code cleanup and moving the event table into getmained space as to be usefull I really need to compress it’s code footprint; from readable code to efficient code (this is mvs3.8j remember, don’t want a novice user to have to learn about multiple base registers just to use a macro).
But first I must add extra code, the reserved textid field I want to use for tagging the events queued as a 4 byte character field is going to be easier for a user to use to delete messages than making the poor sod track message ids or timer timestamps.
So, stable beta EVENTHUB macro release published on my website and github. Final release will look nothing like it.