Running Web Query Reports Using the Java Batch Run Utility
Describes how to run Web Query Reports using the Java™ Batch Run Utility.
The Java Batch Run utility enables you to run one or more Web Query reports from the command line so that the request(s) can be submitted to a batch queue, without having to physically log on to DB2® Web Query. The utility accepts a single report procedure (FOCEXEC), or multiple FOCEXECs that are in the DB2 Web Query installation and executes the FOCEXECs via a Java program.
Parent topic:
IBM DB2 Web Query for System i Overview
Java Batch Run Utility Prerequisites
The following are prerequisites for running the utility:
- DB2 Web Query must be installed and running on the system where the reporting and application servers are running.
- One or more FOCEXECs which exist in the DB2 Web Query environment.
- An available user ID that is licensed for DB2 Web Query.
Invoke the Java Batch Run
To invoke the utility from the command line, type the following syntax:
java classpath com.ibi.as400.IBIMRBatchJob client_root mr_domain mr_folder mr_fex_name [outfilename]where:
- classpath
Is the fully qualified path to the Java class you want to use.
- client_root
- Is the file system path to the client configuration. For example, /qibm/userdata/webquery/ibi/webfocus76/client/wfc.
- mr_domain
- Is the MR Domain name. For example, untitled. The Domain name must be exactly 8 characters. This allows you to use the Domain name instead of the HREF.
- mr_folder
- Is the MR folder name. For example, gr1q35pvuaeh. The report folder name must be exactly 12 characters. This allows you to use the folder name instead of the HREF .
- mr_fex_name
- Is the MR procedure name. For example, report.fex.
- outfilename
- Optional. Is the fully qualified path of the output file. For example, on a Windows® system, c:\temp\output.html.
Breakdown of the Java Command
Java Command
Type/Purpose of Command
java -cpCall Java and set classpath.
/qibm/proddata/WebQuery/ibi/webfocus76 /ibi_html/javaassist/WFAPI.jar:/qibm /userdata/webquery/ibi/webfocus76/LWI /apps/eclipse/plugins/webquery /WEB-INF/lib/com_ibi_as400.jar: /qibm/userdata/webquery/ibi /webfocus76/LWI/apps/eclipse /plugins/webquery/WEB-INF/lib /uas.jar:/qibm/proddata/java400 /jt400ntv.jarClasspath.
com.ibi.as400.IBIMRBatchJobClass to run.
client_rootLocation of the Web Query installation.
/qibm/userdata/webquery/ibi /webfocus76/client/wfc mr_domainDomain name containing the FOCEXEC. (Depends on the location.)
mr_folderFolder name in the domain containing the FOCEXEC. (Depends on the location.)
mr_fex_nameFOCEXEC name. (Depends on the location.)
Submitting a Job
Using SBMJOB, Java commands can be sent to an iSeries® batch queue and also run the process with another user ID. If you want to submit the job to run with another user ID, you need access to the profile of the user ID.
Submitting a Job Using SBMJOB
In the following example, HREFs are used because the original domain name (test) is less than 8 characters and the original domain folder name (tst) is less than 12 characters. The JOB name, JOBQ, and USER are defined to run this job:
SBMJOB CMD(QSH CMD('java -cp + /qibm/proddata/WebQuery/ibi/webfocus76/ibi_+ html/javaassist/WFAPI.jar:/qibm/userdata/we+ bquery/ibi/webfocus76/LWI/apps/eclipse/plug+ ins/webquery/WEB-INF/lib/com_ibi_as400.jar:+ /qibm/userdata/webquery/ibi/webfocus76/LWI/+ apps/eclipse/plugins/webquery/WEB-INF/lib/u+ as.jar:/qibm/proddata/java400/jt400ntv.jar+ com.ibi.as400.IBIMRBatchJob+ /qibm/userdata/webquery/ibi/webfocus76/clie+ nt/wfc testk2de tsti03hsoob1+ mr_fex_name=tstcar2'))+ JOB(JAVABATCH) JOBQ(QBATCH) USER(OSDADMIN)+ CPYENVVAR(*YES)