
HP OpenVMS systems documentation 
Order Number: AAPV6HETK
This manual documents the generalpurpose routines contained in the OTS$ facility of the OpenVMS RunTime Library.
Revision/Update Information: This manual supersedes the HP OpenVMS RTL General Purpose (OTS$) Manual for OpenVMS Alpha Version 7.3.
Software Version: OpenVMS I64 Version 8.2 OpenVMS Alpha Version 8.2
HewlettPackard Company
Palo Alto, California
© Copyright 2005 HewlettPackard Development Company, L.P.
Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.
The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
Printed in the US
ZK5933
The HP OpenVMS documentation set is available on CDROM.
Contents  Index 
This manual provides users of the OpenVMS operating system with detailed usage and reference information on generalpurpose routines supplied in the OTS$ facility of the RunTime Library.
This manual is intended for system and application programmers who write programs that call OTS$ RunTime Library routines.
This manual is organized into two parts as follows:
The RunTime Library routines are documented in a series of reference manuals. A description of how the RunTime Library routines are accessed and of OpenVMS features and functionality available through calls to the OTS$ RunTime Library appears in the OpenVMS Programming Concepts Manual. Descriptions of other RTL facilities and their corresponding routines and usages are discussed in the following books:
The Guide to the POSIX Threads Library contains guidelines and reference information for HP POSIX Threads^{2}, the HP Multithreading RunTime Library.
Application programmers using any programming language can refer to the Guide to Creating OpenVMS Modular Procedures for writing modular and reentrant code.
Highlevel language programmers will find additional information on calling RunTime Library routines in their language reference manual. Additional information may also be found in the language user's guide provided with your OpenVMS language software.
For a complete list and description of the manuals in the OpenVMS documentation set, see the HP OpenVMS Version 8.2 New Features and Documentation Overview.
For additional information about HP OpenVMS products and services, see the following World Wide Web address:
http://www.hp.com/products/openvms 
^{1} This manual has been archived but is available on the OpenVMS Documentation CDROM.^{2} HP POSIX Threads was formerly called DECthreads. 
HP welcomes your comments on this manual. Please send comments to either of the following addresses:
Internet  openvmsdoc@hp.com 
HewlettPackard Company
OSSG Documentation Group, ZKO34/U08 110 Spit Brook Rd. Nashua, NH 030622698 
For information on how to order additional documentation, visit the following World Wide Web address:
http://www.hp.com/go/openvms/doc/order 
The following conventions are used in this manual:
Ctrl/ x  A sequence such as Ctrl/ x indicates that you must hold down the key labeled Ctrl while you press another key or a pointing device button. 
PF1 x  A sequence such as PF1 x indicates that you must first press and release the key labeled PF1 and then press and release another key or a pointing device button. 
[Return] 
In examples, a key name enclosed in a box indicates that you press a
key on the keyboard. (In text, a key name is not enclosed in a box.)
In the HTML version of this document, this convention appears as brackets, rather than a box. 
... 
A horizontal ellipsis in examples indicates one of the following
possibilities:

.
. . 
A vertical ellipsis indicates the omission of items from a code example or command format; the items are omitted because they are not important to the topic being discussed. 
( )  In command format descriptions, parentheses indicate that you must enclose choices in parentheses if you specify more than one. 
[ ]  In command format descriptions, brackets indicate optional choices. You can choose one or more items or no items. Do not type the brackets on the command line. However, you must include the brackets in the syntax for OpenVMS directory specifications and for a substring specification in an assignment statement. 
{ }  In command format descriptions, braces indicate a required choice of options; you must choose one of the options listed. Do not type the braces on the command line. 
bold text  This typeface represents the introduction of a new term. It also represents the name of an argument, an attribute, or a reason. 
italic text  Italic text indicates important information, complete titles of manuals, or variables. Variables include information that varies in system output (Internal error number), in command lines (/PRODUCER= name), and in command parameters in text (where dd represents the predefined code for the device type). 
UPPERCASE TEXT  Uppercase text indicates a command, the name of a routine, the name of a file, or the abbreviation for a system privilege. 
Monospace text 
Monospace type indicates code examples and interactive screen displays.
In the C programming language, monospace type in text identifies the following elements: keywords, the names of independently compiled external functions and files, syntax summaries, and references to variables or identifiers introduced in an example. 
  A hyphen at the end of a command format description, command line, or code line indicates that the command or statement continues on the following line. 
numbers  All numbers in text are assumed to be decimal unless otherwise noted. Nondecimal radixesbinary, octal, or hexadecimalare explicitly indicated. 
This chapter describes the OpenVMS RunTime Library General Purpose (OTS$) Facility. See the OTS$ Reference Section for a detailed description of each routine within the OTS$ facility.
Most of the OTS$ routines were originally designed to support language compilers. Because they perform generalpurpose functions, the routines were moved into the languageindependent facility, OTS$.
The RunTime Library General Purpose (OTS$) Facility provides routines to perform generalpurpose functions. These functions include data type conversions as part of a compiler's generated code, and some mathematical functions.
The OTS$ facility contains routines to perform the following main tasks:
Some restrictions apply if you link certain OTS$ routines on an Alpha system or HP OpenVMS Industry Standard 64 for Integrity Servers (I64) system. See Section 1.2 for more information about these restrictions.
Routine Name  Function 

OTS$CNVOUT  Convert a Dfloating, Gfloating, Hfloating, IEEE Sfloating or IEEE Tfloating value to a character string. 
OTS$CVT_L_TB  Convert an unsigned integer to binary text. 
OTS$CVT_L_TI  Convert a signed integer to signed integer text. 
OTS$CVT_L_TL  Convert an integer to logical text. 
OTS$CVT_L_TO  Convert an unsigned integer to octal text. 
OTS$CVT_L_TU  Convert an unsigned integer to decimal text. 
OTS$CVT_L_TZ  Convert an integer to hexadecimal text. 
OTS$CVT_TB_L  Convert binary text to an unsigned integer value. 
OTS$CVT_TI_L  Convert signed integer text to an integer value. 
OTS$CVT_TL_L  Convert logical text to an integer value. 
OTS$CVT_TO_L  Convert octal text to an unsigned integer value. 
OTS$CVT_TU_L  Convert unsigned decimal text to an integer value. 
OTS$CVT_T_ x  Convert numeric text to a D, F, G, H, IEEE S, or IEEE Tfloating value. 
OTS$CVT_TZ_L  Convert hexadecimal text to an unsigned integer value. 
For more information on RunTime Library conversion routines, see the CVT$ reference section in the HP OpenVMS RTL Library (LIB$) Manual.
Routine Name  Function 

OTS$DIVC x  Perform complex division. 
OTS$DIV_PK_LONG  Perform packed decimal division with a long divisor. 
OTS$DIV_PK_SHORT  Perform packed decimal division with a short divisor. 
Routine Name  Function 

OTS$MOVE3  Move data without fill. 
OTS$MOVE5  Move data with fill. 
Routine Name  Function 

OTS$MULC x  Perform complex multiplication. 
Routine Name  Function 

OTS$POWC xC x  Raise a complex base to a complex floatingpoint exponent. 
OTS$POWC xJ  Raise a complex base to a signed longword exponent. 
OTS$POWDD  Raise a Dfloating base to a Dfloating exponent. 
OTS$POWDR  Raise a Dfloating base to an Ffloating exponent. 
OTS$POWDJ  Raise a Dfloating base to a longword integer exponent. 
OTS$POWGG  Raise a Gfloating base to a Gfloating or longword integer exponent. 
OTS$POWGJ  Raise a Gfloating base to a longword integer exponent. 
+OTS$POWHH_R3  Raise an Hfloating base to an Hfloating exponent. 
+OTS$POWHJ_R3  Raise an Hfloating base to a longword integer exponent. 
OTS$POWII  Raise a word integer base to a word integer exponent. 
OTS$POWJJ  Raise a longword integer base to a longword integer exponent. 
OTS$POWLULU  Raise an unsigned longword integer base to an unsigned longword integer exponent. 
OTS$POW xLU  Raise a floatingpoint base to an unsigned longword integer exponent. 
OTS$POWRD  Raise an Ffloating base to a Dfloating exponent. 
OTS$POWRJ  Raise an Ffloating base to a longword integer exponent. 
OTS$POWRR  Raise an Ffloating base to an Ffloating exponent. 
OTS$POWSJ  Raise an IEEE Sfloating base to a longword integer exponent. 
OTS$POWSS  Raise an IEEE Sfloating base to an Sfloating or longword integer exponent. 
OTS$POWTJ  Raise an IEEE Tfloating base to a longword integer exponent. 
OTS$POWTT  Raise an IEEE Tfloating base to a Tfloating or longword integer exponent. 
Routine Name  Function 

OTS$SCOPY_DXDX  Copy a source string passed by descriptor to a destination string. 
OTS$SCOPY_R_DX  Copy a source string passed by reference to a destination string. 
Routine Name  Function 

OTS$SFREE1_DD  Free one dynamic string. 
OTS$SFREEN_DD  Free n dynamic strings. 
OTS$SGET1_DD  Get one dynamic string. 
Routine Name  Function 

OTS$CALL_PROC  Perform a call to a procedure that may be either in native code or in a translated image. 
OTS$JUMP_TO_BPV  Transfer control to a bound procedure. 
On Alpha and I64 systems, if you use the OTS$ entry points for certain mathematics routines, you must link against the DPML$SHR.EXE library. Alternately, you can use the equivalent math$ entry point for the routine and link against either STARLET.OLB or the DPML$SHR.EXE library. Math$ entry points are available only on Alpha and I64 systems.
Table 19 lists the affected OTS$ entry points with their equivalent math$ entry points. Refer to the Compaq Portable Mathematics Library for information about the math$ entry points.
OTS$ Entry Point  Math$ Entry Point 

OTS$DIVC  math$cdiv_f 
OTS$DIVCG_R3  math$cdiv_g 
OTS$DIVCS  math$cdiv_s 
OTS$DIVCT_R3  math$cdiv_t 
OTS$MULCS  math$cmul_s 
OTS$MULCT_R3  math$cmul_t 
OTS$MULCG_R3  math$cmul_g 
OTS$POWCC  math$cpow_f 
OTS$POWCGCG_R3  math$cpow_g 
OTS$POWCJ  math$cpow_fq 
OTS$POWCSCS  math$cpow_s 
OTS$POWCSJ  math$cpow_sq 
OTS$POWCTCT_R3  math$cpow_t 
OTS$POWCTJ_R3  math$cpow_tq 
OTS$POWGG  math$pow_gg 
OTS$POWGJ  math$pow_gq 
OTS$POWGLU  math$pow_gq 
OTS$POWII  math$pow_qq 
OTS$POWJJ  math$pow_qq 
OTS$POWLULU  math$pow_qq 
OTS$POWRJ  math$pow_fq 
OTS$POWRLU  math$pow_fq 
OTS$POWRR  math$pow_ff 
OTS$POWSS  math$pow_ss 
OTS$POWSJ  math$pow_sq 
OTS$POWSLU  math$pow_sq 
OTS$POWTJ  math$pow_tq 
OTS$POWTLU  math$pow_tq 
OTS$POWTT  math$pow_tt 
Next  Contents  Index 