Redirect a VSAM requests to a
HTML page
STEP1.8: Redirector Server -> Handler
To be able to work with VSAM data on another platform (ASCII), the most important component is the Handler.
The handler is responsible for data manipulation and conversion. Therefore it must know the structure (mapping) of the VSAM record.
The handler used in the workshop is the HtmlHandler.class stored in directory: <redir>\com\ibm\vse\htmlhandler
The handler needs a map to split the record into fields. This map does not need to be defined on the VSE system, but you can reuse a already defined map.
A map for a VSAM cluster can be defined with the Maptool, VSE Navigator or IDCAMS RECMAP utility.
We work with the VSAM Cluster FLIGHT.ORDERING.ORDERS The ORDERS_MAP is already defined.
In the used HTML handler <redir>com\ibm\vse\htmlhandler\HtmlHandler.java the mapping is hard coded.
The Record Layout of the ORDERS Cluster is defined as follows:
Offset Length Type Key Field Name Description
0 | 20 | STRING | no | FIRST_NAME | First Name |
20 | 20 | STRING | no | LAST_NAME | Last Name |
40 | 4 | UNSIGNED | no | FLIGHT_NUMBER | Flight Number |
44 | 4 | UNSIGNED | no | SEATS | Seats |
48 | 1 | BINARY | no | NON_SMOKE | Smoker 0=no |
The Record length is 49 Bytes
The Record Layout is reflected in the Map ORDERS_MAP