OrcaScript allows you to write batch scripts to process PowerBuilder applications and files without using the PowerBuilder development environment. You can use OrcaScript to get the latest version of a target from source control, build the target PBLs, deploy components to EAServer, and compile PowerBuilder executable files—all without operator intervention.
The targets you obtain from source control using OrcaScript could be placed on a network build computer that is shared by PowerBuilder developers. This is especially advantageous for large shops with fixed working hours: the builds could be done nightly by running an OrcaScript batch file, and an up-to-date version of the targets and libraries would be available at the start of the next work day.
Developers could then use OrcaScript or operating system commands to copy the shared files directly to their local computers. Although developers would still connect directly to source control from their local workspaces, refreshing the targets in the workspaces would be much faster since compilation times for complex targets would be greatly minimized.
If you include OrcaScript commands in a batch file, the file is read line by line. Each OrcaScript batch file must begin with a start session command and end with an end session command. You can save the batch file with any extension. You run the batch file by calling the OrcaScript executable on a command line and passing the batch file name as an argument:
OrcaScr110 myOrcaBat.dat
If you use relative directories in the OrcaScript batch file, create the batch file in the directory that is the required root directory at runtime. This must be in the same directory or in the path above a directory containing the files referenced by the batch file.
When you use relative directories, the OrcaScript batch file is portable for all users. However, users must make the directory where they copy the batch file the current directory (the one displayed in the DOS prompt) before invoking OrcaScr110.exe. The command to start the OrcaScript executable can also take the following parameters:
Parameter |
Description |
Example |
---|---|---|
/D |
Sets variables that are valid in the batch file |
|
/H or /? |
Prints syntax help to screen |
|
Caution You should not run an OrcaScript batch file if PowerBuilder is currently running on the same computer. If the PowerBuilder development environment is not shut down while OrcaScript is running, your PowerBuilder libraries can become corrupted. For this reason, casual use of OrcaScript is not recommended.
Each line of an OrcaScript batch file either succeeds or fails. If a command fails, subsequent commands are not processed and the OrcaScript session is ended. An error message is printed to the command window.
A semicolon (;) indicates that the rest of the line is treated as a comment.