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:

Argument

Description

name

String you define for an OrcaScript session.

value

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

pbl_list

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.

pblName

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

pbdflag

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"

applicationName

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.

propertyString

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

versionString

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 "11.0.0.3012".

fromFile

File that you want to copy during an OrcaScript session.

toFile

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

fileName

File that you want to delete during an OrcaScript session.

clobberAttribute

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

NoClobber

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

entryName

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

entryType

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.

toPblName

Name of the PBL to which you copy an entry.

pbrName

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.

exeName

Name of the executable you want to build.

iconName

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

pbdFlags

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.

machinecode

Use to compile the project as machine code.

newvstylecontrols

Use Windows 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.

x64

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.

projectName

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

serverName

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

serverPort

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

logID

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

logPass

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

pbdName

Name of a PBD you append to an EXE.

pblComments

Comments for a PBL you create in an OrcaScript session.

runtime_version

The version of PowerBuilder Runtime that will be used to compile the application executable.

This argument cannot be set in the batch file using the set command; it can only be used with the /D parameter in the command line for OrcaScr190, for example, OrcaScr190 /D runtime_version="19.2.0.2558" myOrca.dat. If this argument is not set, then the runtime version configured in the PowerBuilder IDE will be used; and if no PowerBuilder IDE is installed on the current machine, then the latest runtime within the same major version as OrcaScript will be used.


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:

Argument

Description

workspaceName

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

sccProvider

Name of the source control provider.

userID

Name of the user registered to source control.

password

Password for the user ID.

logFileName

Name of a log file used to record SCC transactions.

projectPath

Path to the source control project.

localProjectPath

Local root directory for the project.

auxProjectPath

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

targetName

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".

offline

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.

refreshType

Value can be:

refresh_all

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

outofdate

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.

refreshOption

Value can be:

importonly

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.

exclude_checkout

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.

file_list

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.