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 OTS$CVT_L_TZ To Convert an Integer to Hex
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: PLI V3.1     OP/SYS: VMS V5.0

SOURCE:     Digital Customer Support Center



OVERVIEW:

This program converts an unsigned integer to a Hexadecimal (HEX) ASCII
string using the Run Time Library (RTL) Routine OTS$CVT_L_TZ.


CAUTION:  This sample program has been tested using PLI 3.1 on VMS 5.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 SAMPLE:

bformat:proc options(main);

/*This program converts an unsigned integer to a ASCII text string
  (HEX). It is particularly useful for converting the PID to its hex
  representation*/

%include OTS$CVT_L_TZ;
%include $stsdef;
dcl value fixed bin(31);
dcl out_str char(8);

value = 541066945;
put skip list ('The value to be converted =',value);

sts$value = OTS$CVT_L_TZ(value,out_str,,);
   If ^sts$success
      then do;
        put skip list('Failure with OTS$CVT_L_TZ ',sts$value);
        signal VAXCONDITION(sts$value);
      end;

put skip list ('The value in hex =',out_str);

end bformat;




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