Submitting Hercules Commands and Jobs
The SENDTOHERC Windows Program.
SENDTOHERC: Send command to Hercules or MVS or 3270
Usage SENDTOHERC "Hercules Commnd" [optional "Window Name"]
BETA test code.
The attached code was originally designed to send a command to Hercules from Windows to tell it that there was a job waiting to be read by issuing a DEVINIT on the Hercules Console. Which it can do.
However, I then wondered why it should be limited to just that function, when it could also be used to send any Hercules Command or MVS command too. It might work for Z/OS too.
Issuing Submit myjcl will call the Windows Bat file which will then call the program sendtoherc.exe "devinit 00c myjcl" which will send the DEVINIT command to Hercules.
Here is the simple Windows Submit BAT file: sendtoherc.exe "devinit 00c %1"
Thus any file can be used in the SUBMIT command as the %1 is a parameter.
Similarly, sendtoherc "/ d a" will issue a "d a" command on the MVS Console. Any command can be sent.
The sendtoherc command can also send keystrokes to a 3270 TSO window too. In fact, any window. For example: sendtoherc "Herc01/cul8tr" "Herctso - wc3270" at the will attempt to logon as User Herc01. My 3270 screens are called "Herctso - wc3270". Yours will almost certainly be different.
Note: When sending commands to Hercules, the Hercules Console must be displayed. And on my system, the window is called: "Hercules - System Status: GREEN".
The program as provided is compiled with a Borland version 5 C compiler and is 64K. With the Borland CLang compiler, it is also 64K. However, when compiled with GCC, it is just under 335K!
Some enhancements might be:
* Allow \n in the command line to issue multiple commands.
* Allow {ENTER}, {PA1} etc to be entered as some similar programs do.
* Change the name to TELLHERC?
I will be adding some Menus to the Windows version of Jol so that most Hercules and MVS can be selected easily.
Download the program from the Download Store.