C Command Line Tools Reference

This appendix lists the parameters for running the OpenScript Command-Line Tools Interface (CTLI). The Command-Line Tools Interface is an umbrella interface for running OpenScript command-line tools. The command-line tools include the OpenScript Command-Line Compiler and the OpenScript Command-Line Asset Updater.

To run the Command-Line Tools Interface, type:

[OpenScript Install Dir]/osclti.bat [options]

[options] may consist of options for the OpenScript Command-Line Compiler or the OpenScript Command-Line Asset Updater, or help information.

C.1 Using the Command-Line Tools Interface

This section describes how to use the command line tools settings.

  • Prints out General help:

    osclti.bat help 
    
  • Runs OpenScript Command-Line Compiler with supplied options. If options are incorrect, it prints the Compiler help and exits:

    osclti.bat compile <options> 
    
  • Prints out OpenScript Command-Line Compiler help:

    osclti.bat compile -help 
    
  • Runs OpenScript Command-Line Asset Updater with supplied options. If options are incorrect, it prints Update Assets help and exits:

    osclti.bat updateAssets <options>
    
  • Prints out OpenScript Command-Line Asset Updater help:

    osclti.bat updateAssets -help
    
  • Prints out General help:

    osclti.bat
    
  • Prints out General help:

    osclti.bat <any unknown argument>
    

C.2 Supported Command Line Tools Interface Options

This section lists the command line settings that can be used with the Command-Line Tools Interface.

C.2.1 Command-Line Compiler Options

The following table lists the OpenScript Command-Line Compiler options.

Setting Description
-script [path_to_script_ folder] Specify the path to a single script's folder for single script compilation. One and only one option from -rootFolder or -script options must be specified. Use -rootFolder option for batch build, use -script option for the single script build.

Example usage:

osclti compile -script "C:\OracleATS\OFT\myScript"

-rootFolder [path_to_folder] Specify a folder containing multiple scripts for batch compilation. When -rootFolder is specified, the tool builds all scripts in the subtree of folders underneath it, recursively. One and only one option from -rootFolder or -script options must be specified. Use -rootFolder option for batch build, use -script option for the single script build.

Example usage:

osclti compile -rootFolder "C:\OracleATS\OFT\"

-logFile [path_to_log] Optional. Specify where the compile log output file should go. User must specify a writable location. If -logFile is not specified, then build.log will be created in the user's folder (i.e. C:\Documents and Settings\<username>) or in the OpenScript directory if the user's folder is not writable.

Example usage:

osclti compile -rootFolder "C:\OracleATS\OFT\" -logfile "C:\logs"

-verbose Optional. Specify whether the compiler should use verbose output logging. If -verbose option is specified, then the compiler prints accessed/processed units into the output log file.

Example usage:

osclti compile -rootFolder "C:\OracleATS\OFT\" -logfile "C:\logs" - verbose

-stopBatch Optional. Specify if the batch compiler should stop on any script failure, or continue compiling other scripts even if a failure happens. The default behavior is not to stop the batch compilation on failure.

Example usage:

osclti compile -rootFolder "C:\OracleATS\OFT\" -stopBatch

@optionsFile Optional. Specify a file containing one or more command-line options. Options can be specified on command-line or/and in the options file specified by the @optionsFile option. The options file can specify any option in the same format as they can be specified on the command-line. Additionally, an options file can use a new line as an option delimiter. If the same option is specified on the command-line and in the options file, then the last argument in order of appearance has a precedence.

Example usage:

osclti compile @C:\OracleATS\OFT\options.txt 

C.2.2 Command-Line Asset Updater Options

The following table lists the OpenScript Command-Line Asset Updater options.

Setting Description
-add Specify to add a new asset. One and only one option from -add or -update options must be specified.

Example usage:

osclti updateAssets -add -rootFolder "C:/OracleATS/OFT" -type script -asset alias=globalLib:Repo/GlobalLib;alias=Login:/Repo/Login

-change Specify to change an existing asset. One and only one option from -add or -change options must be specified.

Example usage:

osclti updateAssets -change -rootFolder "C:/OracleATS/OFT" -type databank -asset alias=user:Repo/databanks/ user.csv

-rootFolder [path_to_folder] Specify a folder containing multiple scripts to update. When -rootFolder is specified, the tool builds all scripts in the subtree of folders underneath it, recursively.

Example usage:

osclti updateAssets -change -rootFolder "C:/OracleATS/OFT" -type databank -asset alias=user:Repo/databanks/ user.csv

-type [AssetType] Specify the type of asset being added or updated. AssetType should be one of the following:
  • jar

  • databank

  • objectLib

  • script

The asset updater automatically detects if this asset is a dedicated function library and, if it is, then it makes appropriate changes in scripts to change.

Example usage:

osclti updateAssets -change -rootFolder "C:/OracleATS/OFT" -type databank -asset alias=user:Repo/databanks/ user.csv

-asset [AssetList] Specify the list of one or more asset descriptions to add or change. If changing an asset, then AssetList should contain a single asset description. Separate multiple asset descriptions with a semicolon. For example: assetDisc;assetDisc;... ;assetDisc.

Each asset description should take the form:

alias=chosenAlias:repoName/path to assetFolder relative to Reposiotry/assetFileName

This is the only possible form of specifying assets to add. In this case, each script will be assigned the asset of this type in the specified repository location. Assets will be known to each script by the specified alias. If an asset of the same type with the same alias exists for a script, then the location of the asset will be changed according to command-line arguments.

When changing assets, each script with an asset of the same type with the same alias will change its location according to the command-line arguments.

When changing assets, the asset description can be specified in another form:

oldRepoName/old/path/toAssetFolder/OldAsset FileName=repoName/path to assetFolder relative to Reposiotry/assetFileName

In this case, if any script has an asset in the old location, then without changing the asset alias, the asset location will be changed according to the command-line arguments.

Example usage:

osclti updateAssets -change -rootFolder "C:/OracleATS/OFT" -type databank -asset data1:Default/DataBank/data1.csv

osclti updateAssets -change -rootFolder "C:/OracleATS/OFT" -type databank -asset alias=funclib1:Default/ assetTest/functions/digme/funcLib1

-logFile [path_to_log] Optional. Specify where the compile log output file should go. The logFile should be located in a directory where the user has rights to read, write, change, create and delete this file. If -logFile is not specified, then build.log will be created in the OpenScript directory.

Example usage:

osclti updateAssets -update -rootFolder "C:/OracleATS/OFT" -type databank -asset alias=user:Repo/databanks/ user.csv -logfile "C:\logs"