 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1988. All rights reserved
LAYERED PRODUCT or COMPONENT: VAX PLI OP/SYS: VMS
SOURCE: Digital Customer Support Center
OVERVIEW:
This program demonstrates how to pass a symbol from a Command
Procedure to a PL1 program.
CAUTION: This sample program has been tested using VAX PL1 V3.1 on 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:
The program is passed a symbol, PARM1, from the command procedure. Its
value is determined by calling the Run Time Library Routine
LIB$GET_SYMBOL.
PROGRAM SAMPLE:
$! Begin EXTRACT
$create lib$get_symbol.pli
ST: proc options(main);
%include lib$get_symbol;
%include $stsdef;
dcl symbol char(5) init('PARM1');
dcl result_str char(10);
dcl result_len fixed bin(15);
sts$value = lib$get_symbol(symbol,
result_str,
result_len,);
if ^sts$success
then signal vaxcondition(sts$value);
put skip list('The value passed from the command procedure was: ',
result_str);
end ST;
$PLI lib$get_symbol.pli
$link lib$get_symbol.obj
$inquire PARM1 "Enter the value to be passed to the program"
$run lib$get_symbol
$! End EXTRACT
|
buy online or call 1.800.AT.COMPAQ
|
|