What is ORCA?

ORCA is software for accessing the PowerBuilder Library Manager functions that PowerBuilder uses in the Library painter. A program (very often a C program) can use ORCA to do the same kinds of object and library management tasks that the Library painter interface provides.

History of ORCA

ORCA was created for CASE tool vendors as part of the CODE (Client/Server Open Development Environment) program. CASE tools needed programmatic access to PowerBuilder libraries to create and modify PowerBuilder objects based on an application design.

Typical ORCA programs

Applications use ORCA to manipulate PowerBuilder objects. They might:

  • Write object source code and then use ORCA functions to place that object source in a PBL

  • Extract objects from libraries using ORCA functions, modify the object source, and use ORCA again to put the objects back in the libraries

Sample ORCA applications

ORCA has been used for many types of tools that work with PowerBuilder, such as:

  • OrcaScript utility

  • CASE tools

  • Class libraries

  • Documentation tools

  • Application management tools

  • Utilities that might, for example, search for text and replace it throughout a library or display a tree view of objects in a library

  • Interfaces for source control systems that PowerBuilder does not support directly

  • Utilities to rebuild PowerBuilder targets from source-controlled objects

What can ORCA do?

ORCA lets your application do programmatically the same library and object management tasks that a developer performs in the PowerBuilder development environment. ORCA covers most of the functionality of the Library painter, and some of that of the Application and Project painters.

You can:

  • Copy, delete, move, rename, and export objects in a PBL

  • Import and compile objects

  • Create an executable or a PowerBuilder Dynamic Library (PBD or DLL) with all of the options available in the Project painter

  • Look at the ancestor hierarchy of an object or see which objects it references

  • Create an entire application in a new library (called bootstrapping an application)

  • Open PowerBuilder targets from source control and perform diverse source control operations on target objects

Who can develop programs that call ORCA?

ORCA as a development tool is designed for vendors who want to provide tools for PowerBuilder developers. Tool vendors must be aware of the constraints described in this section.

ORCA as a development tool is not meant for a wider audience of PowerBuilder developers. If you are a PowerBuilder developer, you should not develop programs that call ORCA unless you understand and observe the constraints described next.

Constraints when using ORCA

Both PowerBuilder and ORCA make use of the PowerBuilder compiler. However, the compiler is not reentrant, and multiple programs cannot use it simultaneously. Therefore, PowerBuilder cannot be running when your programs call ORCA.

Tool providers who use ORCA must code their programs carefully so that when a PowerBuilder developer calls their ORCA-based modules, their tool:

  1. Exits PowerBuilder.

  2. Performs the requested ORCA function.

  3. Restarts PowerBuilder.

Caution

If the PowerBuilder development environment is not shut down while ORCA is running, your PowerBuilder libraries can become corrupted. For this reason, casual use of ORCA is not recommended.