Newsletters   Subscriptions  Forums  Store   Career  Media Kit  About Us  Contact  Search   Home 
fhg
Volume 5, Number 16 -- April 20, 2005

Increase the System Inquiry Reply Line Size in WebFacing


by Michael Sansoterra


WebFacing is a good tool for making green screen applications available for use in the ubiquitous browser. The technology has sufficiently matured to the point where 5250 applications can be tailored to be fairly consistent with true Web applications--with some work, of course. However, even though it is free, there are a few features unavailable with standard WebFacing.

The most grievous of these omissions is WebFacing's inability to render system screens such as those produced by the WRKSPLF or RUNQRY commands. (Actually, system screens can be WebFaced, this just isn't a "free" feature--one has to purchase the Advanced Edition of the WebSphere Development Studio Client for each developer doing advanced WebFacing.)

Although most system screens will not render with the standard WebFacing tool included with WDSc, of necessity, IBM has been kind enough to allow the message inquiry and change password screens to function in the WebFacing environment!

All of that boring background was given just to present a challenge I encountered while WebFacing an application. I needed the ability to run some parameterized Query/400 queries. However, understanding that system screens like the "Select Records" prompt of the Run Query (RUNQRY) command would be unavailable in a WebFacing environment, I decided to convert the Query/400 queries to Query Manager (QM) queries, which can be used to prompt the user for parameters. Parameterized QM queries will function in a WebFacing environment because they use the Message Inquiry (Display Program Messages) screen to retrieve parameter data. As evidenced by the sample screen shot below, the amount of data that can be entered on a message reply line is quite large, although often only one character is needed. (See Figure 1 below.)

Figure 1: Green screen system inquiry reply line (click on the image to see a larger view).

However, when I ran a parameterized QM query in the WebFacing environment, I was surprised to find out that the size of the reply line available to WebFacing is only four characters! All parameters would have to be pretty small to fit with that limitation! Fortunately, with a little digging I found a way to modify this system screen's behavior so that it will accept more characters--so that it functions like its normal 5250 counterpart. Here's how to modify that screen.

In the WDSc--I'm using version 5.1.2.4--open the WebFacing perspective. Expand your WebFacing project and then expand the tree along the following path (your path may vary a little depending on version): WebContent, WebFacing, systemscreens, V5R3, QDDSPEXT, HTML, INQFMT.jsp. This JSP is charged with the task of rendering the system inquiry screen in a browser. Right click on INQFMT.jsp and choose open to start the editor.


Make sure you're viewing the JSP's source and then change the size and maxlength attributes of the HTML REPLYIN text box from 4 to 70 to allow additional characters. To increase the actual visible size of the dynamically generated text box, change the width property of the style attribute from 4em to something larger. I arbitrarily chose 34em.

Here is the original HTML to be modified:

<TD NOWRAP colspan="62" 
rowspan="2"><input style="overflow-y:auto;
width:4em;"
<% if (isProtected) { %> readonly tabindex="-1" <% }
%> id="l<%=zOrder%>_INQFMT$REPLYIN"
previousValue="<%=INQFMT.getFieldValueWithTransform("REPLYIN",
QUOTED_TRANSFORM)%>"
class="<%=isProtected?"wf_pr":""%> wf_default wf_field"
size="4" maxLength="4"
value="<%=INQFMT.getFieldValueWithTransform("REPLYIN",
QUOTED_TRANSFORM)%>"></TD>

Here is the HTML after the three modifications have been made:

<TD NOWRAP colspan="62" 
rowspan="2"><input style="overflow-y:auto; width:34em;"
<% if (isProtected) { %> readonly tabindex="-1" <% }
%> id="l<%=zOrder%>_INQFMT$REPLYIN"
previousValue="<%=INQFMT.getFieldValueWithTransform("REPLYIN",
QUOTED_TRANSFORM)%>"
class="<%=isProtected?"wf_pr":""%> wf_default wf_field"
size="70" maxLength="70"
value="<%=INQFMT.getFieldValueWithTransform("REPLYIN",
QUOTED_TRANSFORM)%>"></TD>

Save the JSP and run your Web-faced application. You should now have a much larger box to work with as shown below. Don't forget, if you refresh the style of your project this change will be lost, so keep a handy backup copy of the JSP once it's done. (See Figure 2 below.)

Figure 2: WebFacing system inquiry reply line (click on the image to see a larger view).

While there are some limitations to WebFacing, at least some of the restrictions can be overcome with a little patience and digging.


Michael Sansoterra is a programmer/analyst for i3 Business Solutions, an IT services firm based in Grand Rapids, Michigan. Click here to contact Michael Sansoterra by e-mail.

Sponsored By
ITERA

What would it cost your company if your
iSeries was down for 2½ days?

One large iSeries shop recently experienced a crippling system failure followed by a series of complications that kept the system down for 2½ days!

Fortunately they had just installed iTera's Echo2 High Availability.

The result: no data was lost, little downtime occurred and users barely had a clue.

Click here to read the full story.


Technical Editors: Howard Arner, Joe Hertvik, Ted Holt,
Shannon O'Donnell, Kevin Vandever
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.


THIS ISSUE
SPONSORED BY:

T.L. Ashford
iTera
Guild Companies


Four Hundred Guru

BACK ISSUES

TABLE OF
CONTENTS
Integrating iSeries Host Applications into Portals

Increase the System Inquiry Reply Line Size in WebFacing

Bullet-Proofing OS/400 User Profiles from Automatic Disablement, Expiration


The Four Hundred
IBM Beefs Up iSeries Disk Arrays, I/O Options

IBM Offers HMC-Less iSeries Linux Partitioning

Mad Dog 21/21: The Princess and IP

IBM Comes Up Short in Q1 After March Fall Off

Four Hundred Stuff
Network Intelligence Adds iSeries Monitoring to Security Appliances

EVault's Online Backup and Recovery Option Adds New Features

Applied Logic's FEU Provides Powerful Database Options

iSeries-centric Call Center Suite Renamed iNspire

Four Hundred Monitor


Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc. (formerly Midrange Server), 50 Park Terrace East, Suite 8F, New York, NY 10034
Privacy Statement