Re: How to create a shareable image on IA64 using Pascal



Hi Adrian,

(Not so much for your benefit as for aothers that may be reading here)

Please do not listen to the incompetent filfth that have responded here!
Heaven forbid that VMS has to contend with the "Can't handle shared memory
slur" on top of everything else :-(

There is nothing wrong with "COMMON" areas and shared PSECTs! Tell the usual
suspects to "you know what"!

OOh! Global Sections are spooky; leave them to Unix! What about Cache
Fusion? What about an operating system that offers functionality? Global
Sections "a bridge too far"?

You all make me sick!

Regards Richard Maher


"Ade" <adrian.birkett@xxxxxxxxxxxxxxxx> wrote in message
news:rYlGk.35222$0D6.20078@xxxxxxxxxxxxxxxx
Hi,

Does anyone have a quick example of how to create a shareable image using
Pascal on IA64 (or please correct the code below). It is intended that
this
image, when installed with /open/header/share/write, will be used simply
as
a data repository for other applications which are linked together with
it.
All the examples I have seen in the documentation refer to shared memory
between linked object files rather than against a shareable image. Any
help
you can give me would be greatly appreciated.

Regards,

Adrian Birkett




My example:

$ edit common.pas
{ potential common storage module }
[environment ('common')]
module common;
type
common_r = record
my_int : integer;
my_str : varying [10] of char;
end;
end.

$ pascal common.pas
$ link common/share
$ install add/open/head/share/write disk1:[dir]common.exe
$ define common disk1:[dir]common.exe

$ edit prog1.pas
{simple data writer program}
[inherit ('disk1:[dir]common')]

program prog1(input output);
var common:[common]common_r;
begin
common.my_int := 1000;
common.my_str := 'Hello';
end.

$ pascal/debug/nooptim prog1
$ link prog1, sys$input/opt
disk1:[dir]common.exe/share
$ run prog1 !step through to end

[in a different process]

$ edit prog2.pas
{simple data reader}
[inherit ('disk1:[dir]common')]

program prog2(input output);
var common:[common]common_r;
begin
writeln('int = ', common.my_int);
writeln('str = ', common.my_str);
end.

$ pascal/debug/nooptim prog2
$ link prog2, sys$input/opt
disk1:[dir]common.exe/share
$ run prog2 !noting that prog1 is still running in your other
process
int = 0
str =




.



Relevant Pages