Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Usage notes for OrcaScript commands and parameters – PB Docs 90 – PowerBuilder Library

Usage notes for OrcaScript commands and parameters – PB Docs 90

Usage notes for OrcaScript commands and parameters

Before calling
any other ORCA functions, you need to open a session:

You can start and end multiple OrcaScript sessions in the
same batch file.

Copying files, objects, and properties

If you want to use OrcaScript simply to move objects among
libraries, you do not need to set a library list or application.
You can use the copy commands to copy files,
objects, and properties. This example copies the d_labels DataWindow
from the source.pbl library to the destin.pbl library:

Setting a library list and an application

If you want to use OrcaScript to build targets or deploy components
(or set product and version information using the set exeinfo command),
you must first set the library list and the current application.
You can set the library list and current application only once in
an OrcaScript session. To use another library list and application,
end the OrcaScript session and start a new session. The following
OrcaScript commands build target libraries and compile an executable
file:

You can use relative paths when you generate PBDs with the “PBD” option, but
the PBD always gets generated in the same directory as the PBL.
To actually run the executable, you might have to move the PBDs
to a “BIN” directory. The above example calls
several file copy commands to accomplish this.

note.gif Building DLLs instead of PBDs If you select 32 as the last argument in a build
library
command, you must use the full path for the PBL
or PBR name included in that call.

Source control example

You can use OrcaScript source control commands instead of
the commands to set the library list and application. The following
is an example of an OrcaScript session that builds the same libraries
as the previous example, but uses the target properties to set a
library list and application:

You can call the scc connect command only
after getting connection properties, and you must call it before
you set or refresh the source-controlled targets. You must call
the scc close command before you end your OrcaScript
session.

Shared library example

If you have another target that shares libraries with a target
that you already refreshed, you can use the OrcaScript exclude command
to quickly reconstitute your target. The following example excludes
the shared libraries shared_obj.pbl, datatype.pbl,
and chgreqs.pbl that were refreshed in the previous
example. It also demonstrates the use of variables for refresh options and
build type. Set statements define variables that can be used throughout
an OrcaScript session wherever the parser expects a string token.

note.gif Defining variables from the command line Instead of defining variables in the OrcaScript session, you
can define them from the command line when you call your script.
If you saved the OrcaScript example in the previous script in a
file named MyExample.dat, you could set the
same variables by typing the following at a command line prompt:

SCC connection properties

The SCC get connect properties command
is an easy way to populate the Orca SCC connection structure with
the source control properties of a local workspace. However, to
create OrcaScript batch files that are portable from one workstation
to another, the recommended technique is to set each property explicitly.
Many of these properties are vendor specific. The best way to obtain correct
values is to copy them directly from the SCC log file for your PowerBuilder
workspace.

After you have obtained the values you need from the SCC log
file, you can create portable batch files by setting the required
connection properties and using relative directories and URLs for
path information. The following example shows portable OrcaScript
batch file commands for a workspace that connects to PBNative:

Build command failures

OrcaScript build commands for an executable or a library fail
if the executable or library already exists in the build directory.
To prevent an OrcaScript batch file containing these commands from
failing, move or delete existing executables and libraries from
the build directory before running the batch script.

Escape characters for string variables

OrcaScript, like PowerScript, uses the tilde ( ~ ) as an escape
character. If you need to include a special character, such as a
quotation mark, inside a string, you must place a tilde in front
of it. A character in an OrcaScript batch file with a tilde in front
of it is processed as a literal character.

Ending an OrcaScript session

You must close an OrcaScript session after you finish calling
other OrcaScript commands. You close an OrcaScript session by calling:

Property values are deleted during end session processing.
If an Orcascript program creates numerous sessions, each individual
session must contain statements to specify property values, such
as those assigned in set exeinfo commands.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x