Jump to page titleUNITED STATES
hp.com home products and services support and drivers solutions how to buy
» contact hp

:

more options
 

hp.com home
End of Jump to page title
Example-PL/I Creating And Linking To An Installed Shareable Image
Jump to content



» 

business support center

Home & Home Office Support:
» HP branded products
» Presario branded products
» Services & Warranties
Small & Medium Business Support:
» Small & Medium Business products
» Small & Medium Business services
Support for IT Professionals:
» Enterprise products (IT Resource Center)
» NonStop enterprise products
» Business & IT Services
Content starts here
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
privacy statementusing this site means you accept its terms