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-PLI Passing a Symbol from a Command File to a Program
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 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
privacy statementusing this site means you accept its terms