 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1989. All rights reserved
LAYERED PRODUCT: PL/I V3.2 OP/SYS: VMS Version 5.n
SOURCE: Digital Customer Support Center
OVERVIEW:
This command procedure creates and compiles 2 PL/I programs and a MACRO
transfer vector. The second program is installed as a known shareable
image. Then the first program is run. The first program calls the second.
The process must have CMKRNL privilege in order for this procedure to work.
PROCEDURE:
$!
$! Linking with and calling an installed shareable image.
$! You need to be have CMKRNL privilege.
$!
$!------------------------- CREATE THE SOURCE FILES AND COMPILE ----------
$ CREATE shar.pli
shar: proc;
dcl filnm file record output;
dcl recot char(80) var init(' some text ');
put skip list(' now in shareable image');
open file(filnm) title('fil.out');
write file(filnm) from(recot);
close file(filnm);
end;
$ PLI shar
$!--------------------------------------
$ CREATE cal.pli
ca: proc options (main);
dcl shar external entry;
put skip list('ready to call SHAReable image');
call shar;
put skip list('done in main...');
end;
$!
$ PLI cal
$!
$ CREATE vec.mar ! create the transfer vector
.title xfer_vector
.transfer shar
.mask shar
jmp l^shar+2
.end
$!
$ MACRO vec
$!------------------------------- NOW DO THE LINKS, INSTALL ----------
$ dflt_dir = f$log("sys$disk") + f$dir()
$ LINK/SHARE shar
$!
$! Optionally, shar.exe may be copied to sys$share, in which case
$! the following logical would not be needed.
$!
$ DEFINE/NOLOG sharil 'dflt_dir'shar.exe
$ SET PROC/PRIV=cmkrnl
$!
$! INSTALL needs to be a symbol to be able to use command mode
$!
$ INSTALL := $SYS$SYSTEM:INSTALL/COMMAND_MODE
$ INSTALL ADD sharil
$! Turn off CMKRNL privilege
$ SET PROC/PRIV=nocmkrnl
$!
$ LINK cal,sys$input/opt
CLUSTER=vec,,,shar
shar/SHARE
$ DEFINE/NOLOG shar 'dflt_dir'shar.exe
$ DEFINE/NOLOG SYS$INPUT TT
$!
$ RUN cal
$! ---------------- CLEAN UP ----------
$ DEASSIGN shar
$ DEFINE/NOLOG sharil 'dflt_dir'shar.exe
$ SET PROC/PRIV=cmkrnl
$ INSTALL DELETE sharil
$ SET PROC/PRIV=nocmkrnl
$ DEASSIGN sharil
$ DELETE *.OBJ.
|
buy online or call 1.800.AT.COMPAQ
|
|