One other gotcha, in addition to the ones Rob mentions:

(4) Although IBM recommends that responses to console commands be written in
a single message, most applications ignore this (conspicuously VTAM).  So,
you should be prepared to receive multiple response messages matching your
CART (look in field MDBCCART of the MDB), with perhaps a delay in between.
In some cases (like D NET,EEDIAG) the responses may be separated by a minute
or more. 

Steven St.Jean
http://sdsusa.com

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Rob Scott
> Sent: Thursday, March 15, 2012 10:49 AM
> To: [email protected]
> Subject: Re: How to? Receive response to a z/OS command issued by a
> program
> 
> Yes - the accepted way to do this is to use EMCS consoles.
> 
> A few gotcha's waiting for you in the darkness :
> 
> (1) Name your EMCS console carefully - beware that other consoles active
> in the sysplex using the same name can generate confusion and extra
> return and reason codes to handle
> (2) To get a response, use the CART keyword on the MGCRE - however, note
> that not all operator commands respond using the CART (it depends on the
> software that gets control to generate the response).
> (3) To handle (2), I would advise some sort of timer to pop after "nn"
> seconds and give up waiting for a response.
> 
> I think the data shown by SDSF on the LOG command (not opercmd
> responses) is gotten via spool browse services (or OPERLOG) rather than
> an EMCS with unsolicited messages.
> 
> Rob Scott
> Lead Developer
> Rocket Software
> 275 Grove Street * Newton, MA 02466-2272 * USA
> Tel: +1.781.684.2305
> Email: [email protected]
> Web: www.rocketsoftware.com
> 
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of McKown, John
> Sent: 15 March 2012 14:31
> To: [email protected]
> Subject: How to? Receive response to a z/OS command issued by a program
> 
> Yes, I'm trying something weird again. I just wrote a quick little HLASM
> program to issue commands via MGCRE. But I think I'm expecting too much
> for too little. I'd like to get the response. Which, from looking at the
> book, makes me think that I need to use the MCSOPER in order to have a
> EMCS console. Is this how it works? Is there anything else I should be
> looking at?
> 
> I guess what I'll end up accomplishing, if anything, is an equivalent to
> the SDSF LOG capability. In which case, maybe I should just use the SDSF
> REXX interface instead. Or, if I really want to be weird, the SDSF Java
> interface.
> 
> --
> John McKown
> Systems Engineer IV
> IT
> 
> Administrative Services Group
> 
> HealthMarkets(r)
> 
> 9151 Boulevard 26 * N. Richland Hills * TX 76010
> (817) 255-3225 phone *
> [email protected] * www.HealthMarkets.com
> 
> Confidentiality Notice: This e-mail message may contain confidential or
> proprietary information. If you are not the intended recipient, please
> contact the sender by reply e-mail and destroy all copies of the
> original message. HealthMarkets(r) is the brand name for products
> underwritten and issued by the insurance subsidiaries of HealthMarkets,
> Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life
> Insurance Company of TennesseeSM and The MEGA Life and Health Insurance
> Company.SM
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send
> email to [email protected] with the message: INFO IBM-MAIN
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send
> email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to