Example: Executing Repository Queries

Follow the steps below to execute a Repository Exchange Protocol (RXP) query. RXP is an XML-based API that you can use to interact with application-level information in the workspace repository. Refer to RXP.bj for argument details.

  1. From a command prompt, enter the following command, substituting file names and paths as appropriate:
    C:\Program Files\COBOL Analyzer\Bin>Brave.exe "C:\Program Files\COBOL Analyzer\Scripts\BRP\RXP.bj" "C:\QueryLog.txt" "Workspace=C:\Workspaces\
    sdkworkspace.rwp" "RXP=C:\Program Files\COBOL Analyzer\Scripts\BRP\RXP\
    Repository.rxp" "Query=Used Sources" "Output=C:\Workspaces\sdkworkspace\Output\U
    sedSources.xml"
    The command consists of:
    • The path to Brave.exe.
    • The path to the RXP.bj file.
    • The path to the output log file generated on execution of the command.
    • The path to the workspace.
    • The path to the .rxp file containing RXP queries.
    • The query to execute in the .rxp file, "Used Sources".
    • The path to the output file. The format of the file depends on the extension.
  2. Check the output log file for errors or warnings. Here is the log file for the command:
    Batch Registration and Verification. Version 2.1.02.2860  (build 2.1.02.2860)
    
    Date: 8/8/2008    Computer: D620-JEREMYW
    Cmd:  "C:\Program Files\COBOL Analyzer\Scripts\BRP\RXP.bj" "C:\QueryLog.txt" "Workspace=C:\Workspaces\sdkworkspace.rwp" "RXP=C:\Program Files\COBOL Analyzer\Scripts\BRP\RXP\Repository.rxp" "Query=Used Sources" "Output=C:\Workspaces\sdkworkspace\Output\UsedSources.xml"
    Job: C:\Program Files\COBOL Analyzer\Scripts\BRP\RXP.bj
    
    14:03:32 >Open C:\Workspaces\sdkworkspace.rwp
    14:03:33 Cuter .ExecuteRXP (Prm.RXP, Prm.Query, Prm.Output, Prm.Project)
    14:03:34 File C:\Workspaces\sdkworkspace\Output\UsedSources.xml has been prepared
    14:03:34 >Close
    14:03:34 ---Finished—