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

Arne Vajhøj arne at vajhoej.dk
Tue Sep 21 19:31:58 EDT 2021


On 9/21/2021 6:55 PM, Jan-Erik Söderholm wrote:
> Den 2021-09-22 kl. 00:22, skrev Arne Vajhøj:
>> On 9/21/2021 5:21 PM, Jan-Erik Söderholm wrote:
>>> Trying to find a better design, now that we hav a need for some
>>> major application redesign anyway for other reasons.
>>>
>>> And, if we do have any non-AST-compatible code in the main code, I'm
>>> also looking for some disable/enable AST functions. They are probably
>>> there, just have to look it up.
>>
>> You may get a much more robust solution by using your IBM MQ instead
>> of a VMS mailbox.
>>
>> No AST's and problem with number of messages.
> 
> Ah, well. Yes, some message queing tool might also be an option.
> And we do use IBM MQ but only for external communication to the
> corporate message bus center. There is no MQ server on VMS only
> client, so a local MQ solution will be hard.

If you have Itanium then you could install the ActiveMQ kit
from VSI. But even with Alpha you could maybe install ActiveMQ
on a Linux VM and use that from VMS. Open source => do not
need approval for CAPEX spend.

> I kind of like the simplines of mailboxes, in particular since
> we got the CREATE/MAILBOX DCL commands. Very simple to setup.

ActiveMQ can auto create queues at first reference.

:-)

> At the moment I'm trying to get the reqidt parameter of the SETIMR
> call to work. It should be sent as a parameter to the AST routine.
> 
> In the main code:
> 
> 01  reqidt              pic 9(9)    comp.
> ...
>      move 1234 to reqidt
>      call "sys$setimr"
>          using omitted
>                by reference delta-time
>                by value ast-proc-addr
>                by value reqidt
>                omitted
>          giving return-value
>      end-call
> 
> 
> In the AST routine:
> 
> linkage section.
> 01  reqidt             pic 9(9)   comp.
> procedure division using reqidt.
> ast-fired.
>      display "reqidt: " reqidt with conversion
>      call "sys$wake"
>          using omitted omitted
>          giving return-value
>      end-call
> 
> This ACCVIO's on the display statement. The weird thing is that
> the virtual address in the ACCVIO message is ...00042D, and that
> is the hex for the value I used, in decimal 1234.
> 
> I must be missing something, it looks like the display statement tries
> to use the value in reqidt as an address instead of the actual value...

I know next to nothing about COBOL, but if COBOL use call by ref as
default like FORTRAN, so that the AST routine expects an address,
then the error makes sense. And the solution could be to call with
address of reqidt in main code (I don't know how to do that i COBOL
but it must be possible).

> Hm... Maybe time to make a second try using some C helper routines.

Or that.

:-)

Arne



More information about the Info-vax mailing list