Rather than use cross-memory services and SETLOCKs within the CONSOLE address 
space, you can use the CNZQUERY service :

CNZQUERY WTOR=YES,
         AMRF=YES,
         ANSAREAALET=WA_ANSAREAALET,
         RETCODE=WA_CNZQUERY_RC,
         RSNCODE=WA_CNZQUERY_RSN,
         MF=(E,WA_CNZQUERY_PLIST)

All you do is build a 2G dataspace for your results buffer and then CNZQUERY 
populates it (via the ANSAREAALET keyword) with a copy of the structures it is 
using.

Much safer.

Rob Scott
Rocket Software.





-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Brian Westerman
Sent: Wednesday, February 12, 2020 6:55 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Finding and replying to outstanding reply

EXTERNAL EMAIL





Hi,

If you can operate in a authorized program, I can give you the assembler code 
to find the CONSOLE address space, and via cross memory services you can get 
the outstanding replies, (all of them or just the subset you want), and respond 
to them if you wish or just read the information from them.  Operating in this 
way allows you to get the reply-id and the text, and if you decide to respond 
to the messages you merely use MSGCRE or whatever you are fondest of to reply 
to the messages you want to reply to.

You can also extract that same code information from the FoodLion COMMANDS 
program I modified years ago on file 19 of the CBTTAPE  (cbttape.org), the 
coding has not changed since I started writing assembler for performing that 
particular operation.  It simple and the entire subset of code is under 20 or 
so lines.  Some of the code in that program is a bit archaic now, but at the 
time it was (I thought) pretty cool, and a lot of it still works.  This 
particular part definitely still works.

Playing with this type of thing through REXX or getting the messages via some 
sort of scraping mechanism is not as efficient and can lead to you responding 
to messages that no longer exist.  You can do that type of thing in an 
environment that is fairly underutilized, but if you want to do the process 
quickly, use assembler.

Don't forget to perform the SETLOCKs (obtain and release) when you go cross 
memory, that's where a lot of people screw up.

If you have problems understanding it, let me know and I'll help you through it.

Brian

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN
================================
Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ 
Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: 
https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - 
http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
================================

This communication and any attachments may contain confidential information of 
Rocket Software, Inc. All unauthorized use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please notify Rocket 
Software immediately and destroy all copies of this communication. Thank you.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to