Download Print this page

Chapter3: Redirect A Vsam File - IBM WAVV 2004 User Manual

Ibm computer accessories user manual
Hide thumbs

Advertisement

Chapter3: Redirect a VSAM file

STEP3.1:
Change Handler to read VSAM record as string
Exit Ditto on VSE and stop the Redirector server on Windows using command quit.
The handler on Windows should be changed to be able to use string fields only.
The handler is stored in <redir>\com\ibm\vse\htmlhandler as HtmlHandler.java
Edit the file and make following changes:
1.
Change the HTML header tag to create an HTML page that will refresh itself
all 5 seconds.
<html><head><title>VSE/ESA Redirector sample</title>
<meta http-equiv=refresh content=5></head>
2.
Change the lines in the source as below to read a string of 49 char.
- Define all fields as String:
String firstname, lastname, flightnumber, seats, smoker;
- Make the changes below in the source code (it's in the last 3-rd )
firstname = requestInfo.getString(0, 20);
lastname
flightnumber = requestInfo.getString(40, 4);
seats = requestInfo.getString(44, 4);
smoker = reqeustInfo.getString(48, 1);
//
smoktmp = requestInfo.getString(48, 1);
//
if(smoktmp.length > 0)
//
//
//
//
.....
htmloutput.flush();
Save the changed file.
To be able to compile it we have to update the CLASSPATH temporary.
set CLASSPATH=VsamRedir.jar;.;%CLASSPATH%
In <redir> type:
javac com\ibm\vse\htmlhandler\HtmlHandler.java
3. Test the changed handler.
Restart the Redirector server on Windows. In <redir> type: run.bat
Use Ditto again, in CHAR mode (right upper corner) add some records with 49
characters each. Now the output.html should refresh itself each 5 seconds and
show the inserted records.
to HTML
= requestInfo.getString(20, 20);
if( smoktmp[0] == 0 )
htmloutput.newLine();
smoker = false;
else
smoker = true;

Advertisement

loading

This manual is also suitable for:

2004