Object Code Accelerator Manual
Using OCA
Object Code Accelerator Manual—528144-003
4-3
OCA Command Usage Examples
Section 5, OCA Syntax and Option Summary for instructions on how to invoke OCA 
and a detailed description of each OCA option.
OCA Command Usage Examples
The following examples show how the OCA command is used:
•
OCA accelerates the object file myobj and generates an accelerated object file 
named myoca:
oca myobj, OUTPUT_FILE myoca
•
OCA accelerates the object file test1, generates an accelerated object file named 
test2, and writes its listing to the file mylist:
oca /OUT mylist/ test1, OUTPUT_FILE test2
Specifying the Code Space
A code space is a part of virtual memory reserved for user library code and system 
library code. For each code space, a compiler generates different code and places 
different restrictions on the run-time library and language features that can be used. 
Refer to the appropriate language manuals for details.
You can specify to OCA whether an object file is to be run as user library (UL) or 
system library (SL). Use the option UL for user library and SL for system library. Note 
that user library code not identified as such to OCA cannot be used as a user library or 
a shared run-time library at execution time. See Translating a System Library on 
page 5-3 and Translating a User Library on page 5-3 for more information.
Accelerating User Libraries and Shared Run-Time Libraries
To accelerate a user library or a shared run-time library, accelerate the TNS object file 
as user library code by specifying the UL option. In the following example, the TNS 
user library MyLib is accelerated and written to the MyLibAx file:
oca MyLib, OUTPUT_FILE MyLibAx, UL
Accelerating Programs With Embedded SQL
To accelerate programs that contain embedded NonStop SQL/MP statements, you 
must perform the following steps in sequence:
1.  Compile
2.  Bind
3.  Accelerate
4.  SQLCOMP
If you reaccelerate a program, you must follow by rerunning SQLCOMP.










