[Info-vax] VMS process communication
Arne Vajhøj
arne at vajhoej.dk
Wed Oct 5 19:06:02 EDT 2022
On 10/5/2022 3:17 PM, John Reagan wrote:
> On Wednesday, October 5, 2022 at 11:28:16 AM UTC+2, Ian Miller wrote:
>> On Wednesday, October 5, 2022 at 12:11:32 AM UTC+1, Arne Vajhøj wrote:
>>> On 9/13/2022 8:34 PM, Arne Vajhøj wrote:
>>>> I do not have any experience wth sys$icc_* so that will
>>>> need a little research.
>>> Done.
>>>
>>> https://www.vajhoej.dk/arne/articles/vmsipc.html#icc
>>>
>>> ICC
>>> Concept
>>> Demo
>>> System Service (C, Fortran, Pascal)
>> the ICC routines are intriguing. Good to see an example. Did you report the issue with Pascal to VSI?
>
> I have not heard about any issues with the ICC definitions being Pascal "unfriendly".
I think only a small fraction of VMS sites use the ICC stuff and only a
small fraction of those use Pascal as language (the ICC stuff is new
enough to C being most common language).
But the fact that I could not get it working does not prove there
is a problem in SYS$LIBRARY:STARLET.PAS - maybe the problem is 40 cm
(16 inches) in front of the screen.
:-)
But some things puzzles me.
The client programs all use:
sys$icc_connectw
sys$icc_transmitw
sys$icc_receivew
sys$icc_disconnectw
All of them have an IOSB argument.
Per the documentation those are:
8 byte IOSB
8 byte IOSB
16 byte IOSB
8 byte IOSB
C has a:
struct _ios_icc
And defines the arguments for the 4 system services as as:
struct _ios_icc *ios_icc
struct _ios_icc *ios_icc
struct _ios_icc *ios_icc
struct _iosb *iosb
Which works fine. It is not obvious to me why the the last one is
different, but no problem.
Pascal has a record IOS_ICC$TYPE and it works fine for me, so that is
all good.
But the argument to the functions are defined as:
VAR IOS_ICC : [VOLATILE] $DEFPTR;
VAR IOS_ICC : [VOLATILE] $UQUAD;
VAR IOS_ICC : [VOLATILE] $DEFPTR;
VAR IOSB : [VOLATILE] $UQUAD;
With:
$DEFPTR = [UNSAFE] ^$DEFTYP;
$DEFTYP = [UNSAFE] INTEGER;
$UQUAD = [QUAD,UNSAFE] RECORD L0,L1:UNSIGNED; END;
Which seems inconsistent and hard/impossible to use for me
($DEFPTR really gave me a hard time).
So I simply used other declarations with arguments:
VAR IOS_ICC : [VOLATILE] IOS_ICC$TYPE;
VAR IOS_ICC : [VOLATILE] IOS_ICC$TYPE;
VAR IOS_ICC : [VOLATILE] IOS_ICC$TYPE;
VAR IOSB : [VOLATILE] IOS_ICC$TYPE;
It works fine and seems a lot more logical to me.
I also had problems with the buffers. $ICC_TRANSMITW
has a SEND_BUF and $ICC_RECEIVEW has a RECV_BUF but they
are declared as $DEFPTR and UNSIGNED. That gave my problems with
transmit so I changed SEND_BUF to also be UNSIGNED.
Arne
More information about the Info-vax
mailing list