Welcome to the Approach DB2 Web Sizing Assistant. With this assistant, you can instantly move your Approach/DB2 applications to the web, or WebSize them, using IBM's DB2WWW technology.
* What is the DB2 Web Sizing Assistant?
* Software requirements.
* Using the DB2 Web Sizing Assistant
* Limitations
What is the DB2 Web Sizing Assistant?
The DB2 Web Sizing Assistant let's you create Internet applications from your Approach/DB2 applications. You can take any new or existing Approach application built on IBM's robust DB2 Database Server and WebSize them using the DB2 Web Sizing Assistant.
You first visually create your Approach application using IBM's DB2 Database Server. You then use the DB2 Web Sizing Assistant to "convert" the Approach application to an IBM DB2WWW or Net.Data application. The assistant will take the Approach forms and reports built on DB2 and create HTML forms using IBM's DB2WWW or Net.Data technology. The final result is a full Internet application utilizing IBM's DB2 Database Server.
Software Requirements
- Lotus Approach 97
- IBM DB2 CAE (only if Approach and DB2 are running on different machines)
- IBM DB2WWW v1 or Net.Data
- HTTP Server
- IBM DB2 Server
Using the DB2 Web Sizing Assistant
Step 1. Select the Approach Application you want to use for the query.
The assistant displays a list of all applications that you currently have open in Approach. You can also choose other applications by choosing "Open".
Step 2. Select the input form and output report.
The assistant displays a list of all available forms and reports in the application you chose.
Select a form. The form displays as an HTML query form.
Select a report to display the result of the query. If you select "Use Report as Input Form", the Approach report that you select will be used for both the query form and the resulting report.
Click "Select Web Background" to select an image to use as the background for both the HTML form and HTML report.
Note: When you install the Web Sizing Assistant through custom install, the images will be installed as a subdirectory under the Approach smartmasters directory. These images must be moved to the appropriate directory on the Web Server.
If "Use Report as Input Form" is selected, the report will be used as both the HTML query form and HTML report.
Step 3. Input
To define a USERID and PASSWORD that will be used by everyone accessing the HTML input form to log into DB2, select "Always use" and enter a USERID and PASSWORD. If you want to prompt the user for either the USERID or PASSWORD, select "Prompt End Users".
Enter a valid database name (required). The Web Sizing Assistant will not continue until this is filled in.
Enter a name for the DB2WWW macro file. The assistant will create the file in the location specified and with the name specified.
Step 4. SQL Options
Next you set the various SQL Options.
Show SQL
Show SQL defines whether the SQL being generated and sent to DB2 is displayed to the user. Select one of the following:
Prompt End Users - Ask users if they want to display the SQL statement on the report.
Always On - Always display the SQL statement on the report.
Always Off - Never display the SQL statement on the report.
Note: If you have the first release of DB2WWW, this option is ignored and the SQL statement always appears. Upgrade to the latest version of DB2WWW or Net.Data.
Search Type
Search Type defines what type of search is being implemented. Select one of the following:
Prompt End Users - Prompt users for the type of search on the query form.
AND - Search type is always And.
OR - Search type is always Or.
Define Error/Warning Message Table
Define Error/Warning Message Table defines SQL error codes that come back from the DB2 server with their own error messages. Messages in this table must be in HTML format.
You can use the Error/Warning Message Table to have your generated macro file "check" for various SQL return codes as a result of a query. If a SQL warning or error occurs as the result of a user query, your generated macro file can do some alternate processing. For example, you can specify your own error/warning messages instead of using the default messages.
To add your own error/warning message checking, specify the sqlcode of the error/warning message you wish to check for. Note that you must specify the sqlcode, not the SQL error message number. For example, to check for the "Username and/or password supplied is incorrect" condition, you must specify sqlcode "-1403", not SQL error message number "SQL01403N". Next, specify the message you would like to be displayed if the sqlcode should occur. Your error message text can include any valid HTML. Lastly, for positive sqlcodes, you have the option of specifying "Continue". If "Continue" is specified, then after your message is displayed, the remainder of your HTML report page is displayed. Thus, if you have a header or footer on your report that you want displayed with your error message, check the "Continue" box. Note that "Continue" is not an option for negative SQL codes. Negative SQL codes can never "continue", and no parts of your HTML report will be displayed.
At the bottom of the table, you have the option of specifying a default error message. If an error/warning occurs for which there is no corresponding entry in the error/warning message table, the default error message is used. If no default error message is specified, an error message from DB2 will be displayed.
Maximum number of rows to return
Maximum number of rows to return defines the maximum number of rows that DB2 will return for the report.
Enter the maximum number of rows to return from the DB2 query. Entering 0 returns all rows.
Step 5. WWW Options
Image Path
The image path is the drive:\directory that images are stored in on the HTML server.
Enter the path of the image directory on the HTML server.
Macro Subdirectory
The macro subdirectory file path is the subdirectory under the DB2WWW Macro directory where the macro file will be stored. This information is optional. The default is the root Macro directory for DB2WWW. The assistant does not create the macro file in this directory unless the user specifies a drive mapped to this directory. User must otherwise move the macro file (*.d2w) to the Macro directory.
Executable Name
The executable name is the path and name of the DB2WWW executable (e.g. /cgi-bin/DB2WWW.EXE)
Enter the directory where the DB2WWW executable resides.
Case Conversion:
Do Not Convert - Any data that the user enters on the HTML input form will be left in the case entered by the user.
Lower Case - Any data that the user enters on the HTML input form will be converted to lower case before the query is submitted.
Upper Case - Any data that the user enters on the HTML input form will be converted to upper case before the query is submitted.
Form Method:
Post - This method causes the query form contents to be sent to the server in the body of a message. (recommended method)
Get -This method causes the query form contents to be appended to the URL.
Limitations
Approach textboxes with calculations
Approach textboxes containing calculations will not be converted. HTML comments are added in the location where the calculated textbox would otherwise be.
Calculated fields are translated for the query form, but are not usable.
Calculated columns in reports will be blank.
Fields
Use the appropriate operators (>, <, =, etc...) for non-CHAR fields for queries. For example enter ">10" for an INT field. CHAR fields will be queried using LIKE '%criteria%' where "criteria" is the string inputted in the field.
Images
HTML tags for images on Approach forms and reports are placed in the *.D2W macro file. The name for the image is its object name with a .GIF extension. To determine an image's object name, go to Design in view that contains the object, select the object by double-clicking it, and select the Macros tab in the InfoBox.
Pictures and miscellaneous objects on report headers and footers
Pictures and miscellaneous objects on report headers and footers are not supported in this version of the Assistant.
Report background color
If the SQL statement is shown, background color for reports does not show (see the Show SQL option). DB2WWW adds this SQL statement to the beginning of the HTML document before the body tag, and this prevents the color from showing. Instead, the default browser color shows.
Table Aliases
The DB2 Web Sizing Assistant does not support table aliases. (Table aliases are used when a table is joined to itself.) The assistant supports joins between different tables.