 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1988. All rights reserved
LAYERED PRODUCT: PLI V3.1 OP/SYS: VMS V5.0
SOURCE: Digital Customer Support Center
OVERVIEW:
This program demonstrates how to call the RTL routine LIB$INSQTI.
CAUTION: This sample program has been tested using:
PRODUCT: PLI V3.1 on OPERATING SYSTEM: VMS V5.0
However, we cannot guarantee its effectiveness because of the
possibility of errors in transmitting or implementing it. It is meant
to be used as a template for writing your own program, and it may
require modification for use on your system.
PROGRAM NOTES:
This program demonstrates how to call the run time library routine
LIB$INSQTI. In addition, it demonstrates how to call LIB$GETVM and
LIB$MOVC3.
PROGRAM SAMPLE:
test: proc options(main);
%include lib$movc3;
%include lib$get_vm;
%include lib$free_vm;
%include lib$insqti;
%include $stsdef;
dcl bytes fixed bin(31) init(8);
dcl bytes8 fixed bin(15) init(8);
dcl qentryp pointer;
dcl qheaderp pointer;
dcl zero (2) fixed bin(31);
dcl mydat (2) fixed bin(31);
mydat(1) = 5;
mydat(2) = 6;
zero(1) = 0;
zero(2) = 0;
/* The entry MUST be quadword aligned, therefore the call is made to
LIB$GETVM, which will return a quadword aligned address of storage.
This storage that is requested, needs to be at least 8 bytes long
for LIB$INSQTI. */
sts$value = lib$get_vm(bytes,qentryp);
if ^sts$success
then signal vaxcondition(sts$value);
/* The header MUST be quadword aligned, therefore the call is made to
LIB$GETVM, which will return a quadword aligned address of storage.
The header MUST be zeroed before the first call is made to LIB$INSQTI*/
sts$value = lib$get_vm(bytes,qheaderp);
if ^sts$success
then signal vaxcondition(sts$value);
/* initialize the entry */
call lib$movc3(bytes8,mydat,value(qentryp));
/* initialize the header, it must be zero */
call lib$movc3(bytes8,zero,value(qheaderp));
sts$value = lib$insqti(value(qentryp),value(qheaderp),);
if ^sts$success
then signal vaxcondition(sts$value);
end test;
|
buy online or call 1.800.AT.COMPAQ
|
|