OrcaScript Commands

OrcaScript commands are not case sensitive. The generic command parameters can include only strings delimited by quotation marks, or predefined variables and constants without quotation marks. White space is used to separate multiple parameters for a single command. Any place a string is expected, a name that has been previously defined (set) in an OrcaScript command can be used.

In the OrcaScript command prototype syntax that follows, brackets indicate a parameter is optional. A pipe character inside angle brackets ( < | > ) indicates that a selection must be made from one of the values inside the angle brackets. As elsewhere in the PowerBuilder documentation, text in italic type indicates a variable.

For commands where a string variable is required by the command syntax but is not essential to the command function (such as pbrName for the build library command), you can use an empty string inside quotation marks for the string value. Most of the OrcaScript commands and parameters are self-explanatory. For usage notes and an example of an OrcaScript batch file for obtaining a target from source control, see Usage notes for OrcaScript commands and parameters.

Some OrcaScript commands are for source control management, such as connecting with the source control server, getting the latest files from the server etc. Only a few of these OrcaScript commands are supported by the SVN/Git solution, and their usage are explained in Usage notes for OrcaScript source control commands with SVN/Git.

OrcaScript commands

OrcaScript supports the following commands:

start session

end session

set name = value

set name += value

set liblist pbl_list [pbl_list ...]

set appendlib pblName pbdflag

set application pblName applicationName

set debug <true |false>

set exeinfo property <companyname | productname | copyright | description> propertyString

set exeinfo property <fileversion | fileversionnum | productversion | productversionnum> versionString

echo value [value ...]

file copy fromFile toFile [ clobberAttribute ]

file delete fileName [ clobberAttribute ]

regenerate pblName entryName entryType

copy entry pblName entryName entryType toPblName

build library pblName pbrName <pbd | 32>

build executable exeName iconName pbrName pbdflags [machinecode] [newvstylecontrols] [x64]

build application <full | migrate | incremental | 3pass>

build project pblName projectName [ serverName serverPort logID logPass]

create library pblName pblComments

deploy winform project pblName entryName [iconName]

scc get connect properties workspaceName

scc set connect property deletetempfiles <true |false>

scc set connect property provider sccProvider

scc set connect property userid userID

scc set connect property password password

scc set connect property logfile logFileName

scc set connect property project projectPath

scc set connect property localprojpath localProjectPath

scc set connect property auxproject auxProjectPath

scc set connect property logappend < true | false >

scc connect [offline]

scc set target targetName [refreshType][refreshOption][refreshOption]

scc get latest version file_list [file_list ...]

scc exclude liblist pblName [ pblName ...]

scc refresh target <full | migrate | incremental | 3pass>

scc close

Argument description

Arguments for OrcaScript commands are described in the table below:




String you define for an OrcaScript session.


Value of a string that you set for the OrcaScript session.


String containing the list of PBLs for the session application. PBL names can be separated by semicolons in a single string, or separated by a blank space in multiple strings.


Name of a PBL for an OrcaScript action or for the OrcaScript session application.


String of a Y or an N. "y" indicates that the library is a PBD. Objects from the PBL are copied into the executable; objects from the PBD are not copied.

Unlike pbdFlags which can be a string of more than one Y and/or N, pbdflag is used with the appendlib command to set only one Y or N for one PBL at a time, for example,

set appendlib "D:\Test\PB\190cmd\test11.pbl" "n"
set appendlib "D:\Test\PB\190cmd\appeontry.pbl" "y"

The appendlib command can be used independently, or used together with the liblist command, for example,

set liblist "D:\Test\PB\190cmd\test11.pbl"
set appendlib "D:\Test\PB\190cmd\appeontry.pbl" "y"


Name of the application for an OrcaScript action.

true | false

Boolean value for enabling or disabling script in conditional compilation blocks set with the DEBUG condition. The set debug command applies to standard PowerBuilder targets only. It affects all objects used by subsequent regenerate and build application commands. It also affects all objects retrieved with scc refresh target and scc get latest version commands.


String for setting the company or product name, copyright owner, or application description.


String for setting the product or file version numbers. The FileVersionNum and ProductVersionNum strings must consist of four integer values representing the major version number, minor version number, fix version number, and build number, with each value separated by a decimal point, for example "".


File that you want to copy during an OrcaScript session.


File name for a file that you copy during an OrcaScript session.


File that you want to delete during an OrcaScript session.


Determines whether the file copy command overwrites an existing file. If the destination file does not already exist, the file copy command creates the file regardless of the clobberAttribute value you select. Possible values are:

Clobber (default)

File copy command overwrites an existing file marked read/write, but does not overwrite an existing file marked read-only


File copy command does not overwrite an existing file even if it is marked read/write

Clobber Always

File copy command overwrites an existing file even if it is marked read-only


Pointer to a string whose value is the name of the referenced object.


Value specifying the type of the referenced object. Values can be: application, datawindow, function, menu, query, struct, userobject, window, pipe, project, or proxy. Certain abbreviations (app, dw, fn, struct, uo, and win) are allowed as substitute values.


Name of the PBL to which you copy an entry.


Name of a resource file you want to include in a build.

pbd | 32

Select PBD to generate PowerBuilder dynamic libraries. Select 32 to generate platform-specific machine code. You must enter a full path for a PBL or PBR if you select 32 as the value of this argument in an OrcaScript build library command.


Name of the executable you want to build.


Name of an icon to use for an executable you build with OrcaScript.


String composed of a series of Y and N values for each library in the library list. A value of "nnyy" indicates that there are four libraries in the library list, the last two being PBDs. Objects from PBLs are copied into the executable; objects from PBDs are not copied.


Use to compile the project as machine code.


Use Microsoft XP visual style or the UI theme for controls. If your application has applied the UI theme, and if you has specified this argument, the UI theme will take effect.


Compile the project as a 64-bit executable.

full | migrate | incremental | 3pass

Build strategy for the session application.

3pass performs a full rebuild of the application. It should be used instead of full when there are complex inherited relationships.


Name of the project object you want to build and deploy.


Name of the server where you want to deploy a project.


Port for the server where you want to deploy a project.


Login ID for the server where you want to deploy a project.


Login password for the server where you want to deploy a project.


Name of a PBD you append to an EXE.


Comments for a PBL you create in an OrcaScript session.

Arguments for source control commands

In addition to some of the arguments listed in the preceding table, OrcaScript source control commands use the following arguments:




Name of the workspace to connect to source control. You must include the path to the workspace, although you can use a relative path.


Name of the source control provider.


Name of the user registered to source control.


Password for the user ID.


Name of a log file used to record SCC transactions.


Path to the source control project.


Local root directory for the project.


Contains any string that the SCC provider wants to associate with the project. It has a different meaning for every SCC vendor.


Name of the target for source control operations.

true | false

Boolean value for appending to the source control log file. If this command is not used but a log file is specified, the session value defaults to "true".


Keyword indicating that an actual SCC connection will not be required for this session. It is appropriate only when the ImportOnly refresh option is used on a subsequent scc set target command. When refreshing a target using ImportOnly, no communication with the SCC provider is required at runtime, so the job may be run offline.


Value can be:


Gets latest version of all objects from the SCC provider and refreshes all target libraries. Does not perform comparisons.


Performs comparisons and updates objects that are out of date. If no refreshType value is specified, the refreshType defaults to outofdate.

Combining values. You can combine compatible refreshType and refreshOption values (for example, outofdate and exclude_checkout) in the same string if the values are separated by a blank space.


Value can be:


Does not perform comparisons and does not refresh. Use to build targets if you refreshed the local path using the SCC provider's administration tool.


Prevents objects that are currently checked out by the current user from being overwritten. Can be used with outofdate parameter in the same OrcaScript command.


String containing one or more resource file names (such as GIFs, HLPs, or PBRs) using relative or absolute path specification. The string should not include file names for objects contained in application PBLs. File names can be separated by semicolons in a single string, or separated by a blank space in multiple strings. The list of files must be on a single line even when file names are contained in multiple strings.