IBM IT Education Services VSE Connectors Workshop Setup of VSAM Redirector WAVV 2004 © 2004 IBM Corporation
VSE Connectors Workshop Setup of VSAM Redirector WAVV 2004 Connectors Wilhelm Mild, Ingo Franzki VSEESA@de.ibm.
VSE/ESA 2.6/2.7 VSAM Redirector The VSAM Redirector is a new VSE/ESA connector, introduced with VSE/ESA 2.6. The VSAM Redirector allows you to redirect all requests to a certain VSAM file into any other file system or database on any other (Java-enabled) platform. VSE/ESA is the client, while the server part runs on any other Java-enabled platform like Windows. For example you could use the VSAM Redirector to synchronize a VSAM file with a DB2 database running on a Windows.
Redirect VSAM requests to a HTML page on Windows - Overview Initial state: ÎYou have a VSAM file that contains data (FLIGHT.ORDERING.ORDERS) ÎYou have applications that work with that VSAM file (i.e.
Chapter1: Steps for installation of VSAM Redirector server on Windows STEP1.1: Navigate to VSE Redirector Server home page Open the VSE Homepage with a web browser: http://www-1.ibm.com/servers/eserver/zseries/os/vse/ Click on "Service and Support" on the left side and then on "e-business connectors and utilities". The page you see contains the VSAM Redirector Server and some tools that can be downloaded for free.
Steps for installation on a workstation STEP1.2: Verification if Java environment installed To install the VSAM Redirector a Java Virtual Machine must be installed on Windows. yTo just run Java programs, the JRE 1.3.x or later is needed (Java Runtime Environment), yto develop/compile Java programs, JDK 1.3.x or later is needed (Java Developer Kit, which includes the JRE).
Steps for installation on a workstation STEP1.4: Download VSE Redirector server Code With Java installed, navigate on VSAM Redirector Server -> Details and Download to: Download latest Code via HTML and click on: redir270-pq74694.zip (VSE 2.6 and 2.7). The file name may vary since it contains an APAR number. Please make sure you have applied the corresponding APAR on your VSE system. The download process will be started. You will be prompted to specify where to save the code.
Steps for installation on a workstation STEP1.5: Install VSE Redirector Server To install the VSAM Redirector server, open a Windows command line and change current directory to the one where install.class resides. Type: java install or start the install program install.bat This will guide you trough the installation process of the VSAM Redirector Server.
Verify installation of VSAM Redirector Server STEP1.6: Verify Redirector server Documentation To verify that the VSAM Redirector Server is installed properly, open the HTML Documentation (For Windows: START -> Programs -> VSAM Redirector -> Online Help The Help HTML page will be opened. STEP1.7: Start VSE Redirector server To start the VSAM Redirector Server, execute: run.
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: \com\ibm\vse\htmlhandler The handler needs a map to split the record into fields.
Chapter2: VSE Settings to redirect a VSAM cluster STEP2.1: Configuration for Redirector Client on VSE\ESA To redirect requests for the: • VSAM cluster: FLIGHT.ORDERING.ORDERS.TEAMxx • in VSAM catalog: VSESP.USER.CATALOG We have to setup the Configuration phase (IESRDCFG.PHASE). In this phase we have to define which VSAM cluster should be redirected to which remote location, and eventually filter which requests.
VSE Settings to redirect a VSAM cluster In your skeleton SKRDCFG consider: – let the job load IESRDCFG into the SVA (Step 2) – let the job copy IESVEX01 to IKQVEX01 in PRD2.
Chapter3: Redirect a VSAM file to HTML 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 \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.
Summary Major Steps to install VSAM Redirector Server on a Java Platform 9install Java Runtime Environment (JRE) or 9Java Developer Kit (JDK) 9free download from SUN or IBM 9version 1.3.x or later http://www.ibm.com/developerworks/java/ 9download VSAM Redirector Server http://www-1.ibm.com/servers/eserver/zseries/os/vse/support/vseconn/redir.
Chapter4: Redirect VSAM requests to a DB2 database on Windows Apache DB2 UDB HTML page TCP/IP Program CICS Transaction Handler Handler Redirector server batch VSAM Request Redirector client VSAM Initial state: VSE/ESA 2.6 ÎYou have a VSAM file that contains data (i.e. FFSTORES.DEMO.CLUSTER) ÎYou have applications that work with that VSAM file (i.e.
Redirect a VSAM file to DB2 Mapping of FFSTORES.DEMO.CLUSTER: Field name Type Offset Length STOREID STORENAME LOCSTREET LOCCITY LOCZIP LOCCOUNTRY LOCREP STOREN1 STOREN2 LDATE WEBPIC1 WEBPIC2 ACODE STRING STRING STRING STRING STRING STRING STRING UNSIGNED UNSIGNED STRING STRING STRING STRING 0 6 31 56 81 91 116 136 140 144 154 174 194 6 25 25 25 10 25 20 4 4 10 20 20 10 To verify the mapping, use the VSE Navigator to display the VSAM data. Right click on the map, choose "Display VSAM Data".
Redirect a VSAM file to DB2 STEP4.3: Create the tables in the database To continue with the next steps –you must have installed a database management system (i.e. DB2). –you must have a JDBC Driver for it (i.e. db2java.zip in \java\). –you must be able to connect to the database (userid/password) Make sure the JDBC driver is in the CLASSPATH. You may have to edit the create.bat/create.cmd/create.sh batch files as well as the run.bat/run.cmd/run.
Redirect a VSAM file to DB2 Before we can work with the data in the database, we have to load the data from VSAM into the database. To do this we define a second cluster, redirect this cluster and copy (repro) the original cluster into the redirected one. STEP4.4: Define cluster FFSTORES.REPRO.CLUSTER with the same attributes as FFSTORES.DEMO.CLUSTER: –KSDS –Max/Avg. record length: 210 –Key Position: 0, Keylength: 6 STEP4.5: Configure the Redirector for FFSTORES.REPRO.
Redirect a VSAM file to DB2 STEP4.6: Copy FFSTORES.DEMO.CLUSTER into FFSTORES.REPRO.CLUSTER: Use the IDCAMS REPRO function to copy the contents of FFSTORES.DEMO.CLUSTER into the redirected FFSTORES.REPRO.CLUSTER: * $$ JOB JNM=REPRO,CLASS=A,DISP=L // JOB REPRO COPY FILE // DLBL COPYIN,'FFSTORES.DEMO.CLUSTER',,VSAM,CAT=VSESPUC // DLBL COPYOUT,'FFSTORES.REPRO.
Redirect a VSAM file to DB2 STEP4.7: Configure the Redirector for FFSTORES.DEMO.CLUSTER: Edit skeleton SKRDCFG: Change the previously created entry in the configuration table. Enter case m in the command line to switch to mixed case mode before editing. Change FFSTORES.REPRO.CLUSTER to FFSTORES.DEMO.CLUSTER IESRDENT CATALOG='VSESP.USER.CATALOG', CLUSTER='FFSTORES.DEMO.CLUSTER', EXIT='IESREDIR', OWNER=REDIRECTOR, IP='', HANDLER='com.ibm.vse.db2handler.
Additional Information zVSE/ESA Home Page http://www.ibm.com/servers/eserver/zseries/os/vse/ ze-business Connectors User's Guide SC33-6719 http://www-1.ibm.com/servers/eserver/zseries/os/vse/pdf/ieswue21.pdf ze-business connectors tools z http://www.ibm.com/servers/eserver/zseries/os/vse/ebus/home.