Pascal accessing shared image data
Posted: Thu Jul 22, 2021 11:01 am
Hi,
I've got a shared image that contains system wide terminal data, the image is installed as:
$1$DGA100:<XXXXYYYY.0NN.SYSLIB>.EXE List head adr/siz/ref = 9D862830/52/26
TRM_DATA;9 Open Hdr Shared Lnkbl Wrt
And there's a [COMMON] record structure variable which stores the data and is defined as:
Terminals : [Common] terminal_data_rec;
What I'd like to do is be able to access the Terminals data via another program, so I can print the data out. So I've written a small Pascal report program and declared the following VARs
VAR
Ghost : terminal_file := ZERO;
Terminals : [Common] terminal_data_rec;
myterm : integer;
However, when I look at the Terminals data from my reporting program the data is empty/binary zero. So looks like I need to map the data but I'm not sure how to? Is there a Pascal function/procedure or so I need to use a system service to map it from the TRM_DATA.EXE?
Thanks in advance.
Gary
I've got a shared image that contains system wide terminal data, the image is installed as:
$1$DGA100:<XXXXYYYY.0NN.SYSLIB>.EXE List head adr/siz/ref = 9D862830/52/26
TRM_DATA;9 Open Hdr Shared Lnkbl Wrt
And there's a [COMMON] record structure variable which stores the data and is defined as:
Terminals : [Common] terminal_data_rec;
What I'd like to do is be able to access the Terminals data via another program, so I can print the data out. So I've written a small Pascal report program and declared the following VARs
VAR
Ghost : terminal_file := ZERO;
Terminals : [Common] terminal_data_rec;
myterm : integer;
However, when I look at the Terminals data from my reporting program the data is empty/binary zero. So looks like I need to map the data but I'm not sure how to? Is there a Pascal function/procedure or so I need to use a system service to map it from the TRM_DATA.EXE?
Thanks in advance.
Gary