I recently shared with readers a tip about a free utility called Web Object Wizard (WOW), which takes all the complexity out of WebSphere development. Response to this tip was overwhelming and positive; however, many users requested a improved front end to help power users to generate reports. Previous versions of the WOW utility required coding direct SQL. This tip is a response to Search400.com users' requests and illustrates how to use the new enhancement.
As previously stated, many of you are familiar with the capabilities provided with the green-screen product called Query/400. Query/400 has been a popular and useful tool for iSeries users for many years. As you know, businesses use Query/400 to generate reports by selecting and sequencing files and fields using DB2/400 files. Using WOW Version 6.35, you can have something as similar as Query/400 on the Web.
This tip will show you how to build a Web application that accesses iSeries data in fewer than 10 minutes using WOW and the new feature, Web Enterprise Extractor (WEE). Using WOW and WEE gives non-technical users the ability to create dynamic Web applications. You simply select the library, table and fields, and the rest is handled for you.
What is WOW?
WOW is a rapid-application development (RAD) tool used for creating Web applications that access iSeries files and programs. WOW runs on top of IBM's WebSphere Application Server or Apache's Tomcat. Most programs require no or very little manual coding. For more complex applications, WOW can provide a base functionality, which can be further customized by application designers using Java.
WOW application example
For the demonstration, the iSeries data used is stored in the QCUSTCDT table in the QIWS library. This is a sample customer database supplied by IBM and is available on all iSeries systems. For reference, use the table and field names in the below screen shot.
For the free entry-level WOW download link, send an e-mail to firstname.lastname@example.org, and the download links and instructions will be e-mailed to you.
Getting signed on
After setting up a WOW development account, simply sign on with a WOW account and you should see the main screen of WOW.
There is a set of four wizard steps that guide WOW programmers through the process of creating Web applications.
1: Create a connection
Before creating an application, first define a database connection that the application will use.
Click on the "1 Setup Connection(s)" link along the top to view a list of all the database connections. Unless a connection has been defined, this screen will be blank. Click the "insert" button to create a new connection definition.
To define a database connection, specify the following attributes:
- Connection alias -- This is any text uniquely identifying this database connection.
- URL -- The JDBC URL of the database. The URL requires the format: "jdbc:as400:YourIPAddress". In the above example, the iSeries IP address is 192.168.0.10. Specify your iSeries IP address or iSeries system name.
- JDBC driver -- The type of JDBC driver to use. For connecting to the iSeries from a Windows server, use the "AS/400 Remote" driver.
- User ID -- The user ID to use when connecting to the database. This must be a valid OS/400 user profile.
- Password -- This is the password to use when connecting to the database. This must be a valid password for the user profile specified.
When done, click the "insert" button to save the new connection definition. This will return you to a listing of all the connection definitions that have been created, which will now include the newly created connection definition.
2. Set up the application
After creating a connection definition, select the "2 Setup Application(s)" link along the top of the page. To insert a new application, click the "Create Application" menu item on the left side of the screen. This brings up the Application Creation screen.
This screen allows information to be entered that will define the application. The properties of a WOW application include the following:
- Name -- The name of the application
- Description -- A description of the application
- Connection Alias -- An alias for the system on which the application's data will be kept. This must be one of the connection definitions that you have created.
There are additional advanced application properties that can be set for advanced programming.
3. Adding an SQL operation to the sample application
A WOW application contains one or more operations. Operations are your data inquiries. In this sample application, we will retrieve data from the QIWS/QCUSTCDT table.
To add an SQL operation to the application just created, select the application and click on the "3 Setup Operations" link along the top. This brings up a list of all the operations in the application. (Since the application was just created, it won't contain any operations.) Choose the "Create Data Inquiry" menu item to start the WEE builder.
The WEE builder screen allows you to simply select a library and table that you want to access. Previous versions required SQL knowledge. After doing so, simply select "search" and the available fields within the table will be presented. The next step is to simply name your WEE operation. In this case, I used "Customer List" as my operation name.
Next simply select each field you would like to have shown in the "Show" column. After doing so, click the "Save Data Inquiry Operation" at the bottom of the screen.
That's it! You've now created a Web application that will query your iSeries data and present it on the Web.
4. Running the application
To see the application in action, click the Step 4 Run at the top of your screen. A new browser window will open with the running application.
You can add additional operations by repeating Step 3. Experiment with your own files if you wish. WOW can access any data.
You can put WOW to use to build applications such as these:
- Management Reports. WOW can be used to query order and sales files and bring real time data to management with a single browser click.
- Employee directories
- Product and inventory viewing
- Insurance claims
- CRM, help desks, FAQs, Q&A databases, etc.
About the author: Paul Holm is a former IBM-Rochester WebSphere, Java, and DB2 developer/consultant. He specializes in helping iSeries RPG shops develop Web-based applications. Paul can be reached at email@example.com.