Running the Samples

How to:

There are multiple sample applications provided for various functions. Five batch files are provided to assist in running these applications. The batch files are named according to function and include:

Each of these batch files reference a batch file named setenv.bat, which will set environment specific settings, such as the location of the Java executable and the classpath. In order to run these batch files, this will need to be configured in a similar fashion as SamplesComp.bat.


Top of page

x
Syntax: How to Configure the setenv.bat Batch File

This section provides the contents of and variable descriptions for the setenv.bat file.

Notes:

@echo off
REM Copyright 1996-2013 Information Builders, Inc. All rights reserved
REM -- uncomment the line below and replace with the install root of WebFOCUS
rem set IBI_DOCUMENT_ROOT=c:\ibi\WebFOCUS80
REM -- optional: change the line below and replace with your application classpath
rem set APPL_PATH=.\CompiledCode
REM -- optional: replace default WebFOCUS Java Home
rem set JAVA_HOME=C:\Program Files\Java\jre6
REM -- optional: used to echo back environment variables
rem set ECHO=ON

where:

IBI_DOCUMENT_ROOT

Is the root location of the WebFOCUS Client installation. For example, c:\ibi\WebFOCUS80.

APPL_PATH

Is the location of the compiled API samples programs or class files.

JAVA_HOME

Is the location of the Java installation. For example, C:\Program Files\Java\jre6.

Note: When the migrate utility is run upon upgrading from releases prior to WebFOCUS 8, folders are created to store the schedules. When a new WebFOCUS 8.0 version is installed without migrating, you can use the following procedure to ensure that the requisite folders are created.


Top of page

x
Procedure: How to Create Folders Required for the API Samples
  1. In the WebFOCUS BI Portal, right-click Content in the Resources tree.
  2. Click New and then click Folder.
  3. In the Title field, enter ReportCaster and click OK.
  4. Right-click on the ReportCaster folder and click Properties.
  5. Select the Auto Create My Contents Folder check box and click OK.
  6. Right-click on the ReportCaster folder again and click Publish.

    Note: If this task is not performed, then certain sample API programs like S06_Add_Notification will display the following error message:

    Failed to find the folder IBFS:/.../~admin

  7. In the WebFOCUS BI Portal, right-click Content in the Resources Tree.
  8. Click New and then click Folder.
  9. In the Title field, enter Library Content and click OK.
  10. Right-click on the Library Content folder and click Publish.

WebFOCUS