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 Calling A Function That Returns A String
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.3     OP/SYS: VMS Version 5.2

SOURCE:     Digital Customer Support Center


OVERVIEW:

This trivial program shows how to call a PL/I procedure as a function
with no arguments.  The function then returns a string value.


*** CAUTION ***

This sample program has been tested using PL/I version 3.3 on VMS
version 5.2.  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 EXAMPLE:

top: proc options(main);
dcl sub entry returns (char(20));
dcl ans char(20);

ans = sub();
put skip list('  result string = ',ans);
end;

/*------------------------------------*/

sub: proc returns(char(20));
put skip list(' - - now in subrtn - - ');
return('abc123');
end;



buy online or call 1.800.AT.COMPAQ
privacy statementusing this site means you accept its terms