Matteo wrote:
[...]
Post by ***@yahoo.com [hercules-390]I would need to run a linux script from linux shell
that sends zos commands, the run linux commands and
then again runs zos commands.
I would need to run everything from linux shell,
not from inside hercules.....
How does z/OS interface (interact/communicate) with the outside world? And can that interface be automated? Those are the question that need to be asked and answered.
One way that z/OS interacts (interfaces) with the outside world is via its master console. The z/OS operator enters z/OS commands on the master console and z/OS processes them and displays the results.
The z/OS master console is *usually* (typically) a 3270 display terminal, BUT... it doesn't have to be. z/OS is able to communicate to its operator (and the operator is able to communicate with z/OS) via the "Hardware Management Console" (HMC). On Hercules, the HMC is the same panel display that Hercules uses to display its messages to you and which contains a command-line where you can enter Hercules commands. The guest operating system (z/OS) is able to write messages to Hercules's HMC (panel) and Hercules is able to send commands directly to the guest (z/OS).
But you need to first ask the guest (z/OS) to use the HMC as its master console, and not a 3270 display. I'm not sure how to do that (I'm not a z/OS person), but I do know that when z/OS is IPLed, if it cannot find a master console, it will automatically begin sending its messages to the HMC (Hercules panel).
IF/WHEN z/OS is thus using the HMC for all operator communication, you can then send it commands via the Hercules command line, by simply prefixing your Hercules commands with either an exclamation mark (for unsolicited commands) or a period (for solicited replies).
Then all you need to do is figure out a way to communicate with Hercules from the Linux shell. You would enter a "Hercules command" from your Linux shell, and that command would be sent to Hercules, which would then send it to your z/OS guest. The z/OS response would be written to the Hercules panel AS WELL AS being returned back to your Linux shell for display.
So how do you communicate with Hercules via the Linux shell?
Via HTTP!
Hercules supports an HTTP Server interface. Simply configure the HTTP Server via the "HTTP" configuration file statements and Hercules's HTTP Server will be up and running.
Then via a simple Linux shell script, you can send commands to, and receive responses from, Hercules (which, as explained, will simply act as the "middle man" in your communication chain: if the commands you send to Hercules start with '!' or '.', then Hercules will send them to z/OS, and whatever response z/OS writes will be written to Hercules's panel, which should be returned to your Linux script).
I do not know whether doing things this way is the best way (or the easiest), BUT... it is one possible way to accomplish what it is you are trying to do.
Others on the list can help you with the details.
Hope that helps!
--
"Fish" (David B. Trout)
Software Development Laboratories
http://www.softdevlabs.com
mail: ***@softdevlabs.com