Products Resources Support About Us

Issuing MVS console commands from Bash script

bash

#1

Hi,

Is it possible to execute a MVS console commmand (ie, D IPLINFO) from a Bash script and get the output? I know I can use Java or even REXX, but plain old Unix is much easier for me :slight_smile:

Thanks!


#2

Hi Ocurero,

I hope this link may help you: http://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb600/bpx1rx21.htm

There are few examples of REXX usage under shell: http://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb600/xmp.htm#xmp

Using TSO/E commands in shell scripts: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.bpxa400/bpxug199.htm

Using the tso command: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.2.0/com.ibm.zos.v2r2.bpxa400/tsoshc.htm#tsoshc

Regards,
Andrey


#3

take a look at oeconsol
https://www-03.ibm.com/systems/z/os/zos/features/unix/bpxa1ty2.html

this a a APF module and omvs command that you can issue console commands (assuming you have authority of course) directly from OMVS.
oeconsol “D A,ALL” for example
you can redirect output, grep what ever with it. very scriptable.

or just oeconsol
which drop you to a prompt and you can issue multiple console commands
end will get you out of it

Sandra


#4

Is ‘oeconsol’ still supported/updated? I don’t believe it is one of the products that Rocket supports, as I don’t see any reference to it on the download page, but I was wondering if people still use it. I have used it in the past and been very please with it, but I seem to be getting some strange behavior from it since we upgraded to z/OS 2.3. Thanks

John