From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 27-MAY-1994 12:39:55.95
To:	EVERHART
CC:	
Subj:	Re: Help with AXP shared images

From: Dale Dellutri <ddellutri@delphi.com>
X-Newsgroups: comp.os.vms
Subject: Re: Help with AXP shared images
Date: Fri, 27 May 94 09:47:10 -0500
Organization: Delphi (info@delphi.com email, 800-695-4005 voice)
Lines: 79
Message-ID: <xS4PuMu.ddellutri@delphi.com>
NNTP-Posting-Host: bos1g.delphi.com
X-To: Gregory D. Nowicki <nowicki@tardis.larc.nasa.gov>
To: Info-VAX@CRVAX.SRI.COM
X-Gateway-Source-Info: USENET

Gregory D. Nowicki <nowicki@tardis.larc.nasa.gov> writes:
 
>SEEKING ENLIGHTENMENT ON ALPHA Shared Images
>
>I am attempting to create and install a shared image on an Alpha
>workstation running OpenVMS V1.5-1H1.  The same procedure that works fine
>on a VAX will not work on the Alpha.  The program will compile, link and
 
Susan (via Greg):
 
Here's a com file that we use to automatically install shared
common areas defined in DEC Fortran include files on
AXP VMS v1.5-1H1.  The first parameter is the name of the
include file (with no END statement so it is suitable for
including into a Fortran program), the second parameter is
the name of the common area (as defined inside the include file).
Before using this com file you MUST replace all occurences of
<sid> with the logical name of the shared image directory on your
system.  We have a separate one on the system disk.  The com
file will append an END statement (the file <sid>:end_statement.for
is a 1 line file which just has a Fortran end;  you'll need to
create this file) to the include file creating temp1, create temp2
which has the correct link commands, compiles temp1, links it
with temp2, sets the protection of the .EXE, installs it, lists
the result of the install, and creates an .OPT file for others
to use when linking against the shared image.  Finally it reminds
you to add an install line in systartup_vms.com.
 
If you have any questions, send me e-mail
 
Dale Dellutri -- ddellutri@delphi.com
 
$!----- beginning of INSTALL_COMMON.COM ------------------
$ on error then exit
$ say = "WRITE SYS$OUTPUT"
$ say "This com file will install common areas"
$ if p1 .eqs. "" .or. p2 .eqs. "" then goto say_error
$ include_file_spec = f$search(p1)
$ say "Source include file = ",p1
$ say " = ",include_file_spec
$ if include_file_spec .eqs. ""
$ then
$  say "Source include file does not exist"
$  goto say_error
$ endif
$ say "Common area name = ",p2
$ read /prompt=" OK? (Y|N) " /end=say_error /err=say_error sys$command response
$ response = f$edit(response,"COLLAPSE,TRIM,UNCOMMENT,UPCASE")
$ if response .nes. "Y" then goto say_error
$ include_file_name = f$parse(p1,,,"NAME","SYNTAX_ONLY")
$ cop 'p1',<sid>:end_statement.for <sid>:temp1.for
$ open /write temp_opt_file <sid>:temp2.opt
$ write temp_opt_file "SYMBOL_VECTOR=(",p2,"=PSECT)"
$ write temp_opt_file "PSECT_ATTR=",p2,",PAGE,SHR,WRT"
$ close temp_opt_file
$ fortran /object=<sid>:temp1 <sid>:temp1
$ link /shareable=<sid>:'include_file_name' <sid>:temp1,<sid>:temp2/opt
$ set protection=(world:rwe) <sid>:'include_file_name'.exe
$ install add /shared /writable <sid>:'include_file_name'.exe
$ install list <sid>:'include_file_name'.exe
$ open /write perm_opt_file <sid>:'include_file_name'.opt
$ write perm_opt_file "PSECT_ATTR=",p2,",PAGE,SHR,WRT"
$ write perm_opt_file "<SID>:",include_file_name,".EXE/SHAREABLE"
$ close perm_opt_file
$ set protection=(world:re) <sid>:'include_file_name'.opt
$ directory /owner /protection <sid>:'include_file_name'
$ say " "
$ say "type <SID>:",include_file_name,".OPT"
$ say " "
$ type <sid>:'include_file_name'.opt
$ delete <sid>:temp1.for.0,temp1.obj.0,temp2.opt.0
$ say " "
$ say "Please add an install line for <SID>:",include_file_name,".EXE"
$ say " to SYSTARTUP_VMS.COM"
$ exit
$say_error:
$ say "Re-execute with P1 = Source include file, P2 = common area name"
$ exit
$!----- end of INSTALL_COMMON.COM --------------

