[Info-vax] Returning data from Cobol AST routine.
Andrew Commons
andrew.commons at bigpond.com
Wed Sep 29 05:12:20 EDT 2021
I did this many years ago in MACRO32.
The main program set up two queues:
(a) An empty work queue
(b) A buffer queue primed with some arbitrary number of buffers.
The queues were managed using INSQUE/REMQUE.
Main pulls a buffer from the buffer queue, QIOs the mailbox with AST
routine with queue headers as AST param, then $HIBERs.
On wake it pulls buffer from the work queue and processes it putting the
buffer on the end of the free queue when done. Loop until work is
empty then $HIBER.
The AST routine puts the filled buffer on the end of the work queue,
pulls a buffer from the free queue, QIOs the mailbox, $WAKE, and returns.
Volume was low so didn't have to worry about running out of buffers
The LIB$ routines give you access to the instructions so this should
be possible in COBOL.
More information about the Info-vax
mailing list