[Info-vax] Returning data from Cobol AST routine.

Arne Vajhøj arne at vajhoej.dk
Wed Sep 22 09:10:20 EDT 2021


On 9/21/2021 9:59 PM, Dave Froble wrote:
> On 9/21/2021 9:53 PM, Arne Vajhøj wrote:
>> On 9/21/2021 9:46 PM, Dave Froble wrote:
>>> On 9/21/2021 5:13 PM, Jan-Erik Söderholm wrote:
>>>> But my guess is that, if you queue QIOs from multiple sources, the AST
>>>> routine must have some way to tell which source it was that trigged
>>>> the AST. Say you make (made up example, not part of our current target)
>>>> 10 QIO calls having the address of the same AST routine in the calls,
>>>> each QIO reading from its own TNA device, you need to know in the AST
>>>> routine which TNA device (like 10 different production machines) it
>>>> was that sent something.
>>>
>>> That sounds like a real headache.  Perhaps event flags would help.  I
>>> tend to avoid event flags.
>>>
>>>> I have probably not read enough aboit AST and QUI calls yet...
>>>
>>> ASTs can be fun.  I try to use them to set flags or cancel I/O.
>>> Cancelling an I/O causes a completion of an async read.  I feel that
>>> if I try to get "tricky", I'll outsmart myself,
>>
>> That is why I suggested a message queue instead of mailboxes,
>> $QIO(W) and AST's.
> 
> You'd still have to check the message periodically.  Testing a flag, and 
> already having the message in a buffer, should be more efficient.

Using a message queue (like IBM MQ or ActiveMQ) will avoid AST's,
avoid $QIO(W) and will avoid mailbox size limits.

But it does not solve the concurrency problem.

I would go for a thread for that.

Arne




More information about the Info-vax mailing list