[Info-vax] Returning data from Cobol AST routine.
Dave Froble
davef at tsoft-inc.com
Mon Sep 20 22:41:45 EDT 2021
On 9/20/2021 6:55 PM, Jan-Erik Söderholm wrote:
> Hi.
>
> I have been looking at the Cobol AST example here:
> http://computer-programming-forum.com/48-cobol/b75d8c5fdd43048e.htm
>
> This does work fine as an example. But what are the options to get
> some data back to the main program (called "x" in the example)
> from the ast program (called "ast_routine" in the example)?
>
> I have tried different versions of global, external and so on, but
> no luck so far. How to get "x" and "ast_routine" to share some data?
> Anything similar to an COMMON area in Fortran?
>
> The idea is to have an AST routine that will read from a mailbox when
> something is written to it. My idea was that the read of the mailbox
> would be using an AST to avoid polling the mailbox.
>
> This is to have a command input to detached processes to get them to
> reload the config, repoen the log file, close and exit and so on.
>
> Are there more options if not everything is done in Cobol?
> We can easily add some C if that helps...
>
> Regards,
> Jan-Erik.
Ok, a question, will the program using an AST be waiting, or will it be
busy doing other work, and interrupted when the AST fires?
Arne mentioned a timer AST, but that doesn't sound like what you want.
If the program is waiting for a message, then just queue up the read
with possibly a timeout.
If the program will be doing other work, then the read is an event to
interrupt current work.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list