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

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Wed Sep 22 14:09:08 EDT 2021


On 2021-09-22 01:46:20 +0000, Dave Froble said:

> 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.

The AST parameter is used for that. This is why I pass around that 
context block (data buffer(s), the IOSB, other app-specific data, etc), 
and why I requeue the context block to pass around the data.

>> 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, not so hard to do with 
> dumb Dave.

Yes; setting a "cancel in progress" bitlock in the app context for that 
processing is the wise way to go here, too. Chasing $cancel requests 
around is less than fun.


-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list