
VSAM Connector Server connects with the VSAM environment to write the data records on VSAM source data sets from a batch-supported target, which has access to easy-to-use, browser-based interfaces to define VSAM connections and mappings.
This blog shows how to access a VSAM file on a remote z/OS system from EGL-generated Java code or the EGL debugger using TCP/IP.
VSAM Connector Server controls the operation if you typically access the file through a batch job and uses group source processing to read bulk data from ESDS, KSDS, or RRDS data sets with multiple record types.
To set up z/OS and Rational Business Developer for remote VSAM support:
Install and configure the EGLVsamCon VSAM handler module on the z/OS system. EGLVsamCon is an archive file that contains a set of Java programs that handle the VSAM access requests and return the results.
Steps to add data to the VSAM file with a VSAM connector server:
Step-1: Transfer the file EGLVsamCon.jar to the z/OS host.
IBMIMSharedpluginscom.ibm.etools.egl.vsam_8.0.0.v20230403_1104EGLVsamCon.jar to z/OS host
Follow the below steps to transfer a file to the host:
1. Once the session is ready to prompt, click on the SEND icon on the Toolbar.
2. Browse the PC file name and host file name.
3. Select the transfer Type as Binary.
4. Click Add to List.
5. Selected list gets added & click Send.

Step-2: Create a Java project and add the logic.
Follow the below steps to create and add logic to the java project:
1. Navigate to File -->New-->EGL project.
2. EGL Project window will appear.
3. Enter the Project name.
4. Select the General Project option.
5. Select Java in the Target Runtime Platform.
6. click Next and then Finish.
7. Right-click the EGL source in the general project.
8. Go to New-->Program.
10. Enter the Package name and Program name.
11. Click Finish.
12. Specify the syslib.setRemoteUser("user_id", "pswd") to connect with the host.

Step-3: Add the EGLVsamCon.jar into the Java build path.
Follow the below steps to add the EGLVsamCon.jar to the Java build path:
1. Go to Project Explorer.
2. Select and right-click the created project.
3. Select Properties.
4. Properties for the PH52409 window will appear.
5. Select Java Build Path and go to the Libraries tab.
6. Click Add External JARs…
7. Browse the required files and select Apply.
8. Click OK.
Note: EGL Java generation, update the java build path for the project to point to the updated EGLVsamCon jar file (EGL Debugger will already be updated to use the new jar file).

Step-4: Create build descriptor resource association.
On the property tab – give the systemName as ZOS:\\ZOSIP:5553\//Vsam name'
Note: 5553 is the VSAM connector server port.

Step-5: Java Generation.
Follow the below steps to generate a Java program:
1. Select and right-click on the created project.
2. Go to Run As and Select Java Application.
3. As the program is generated successfully without any issues, the response is printed on the console.


Step-6: EGL debugging process.
Follow the below steps to debug the EGL program:
1. Select and right-click on the created project.
2. Go to Debug As and select Java Application.
3. The project has been deployed successfully.

Step-7: Verify the data loaded on VSAM in the host.
Follow the below steps to verify the data loaded on VSAM in the host:
1. Login to PCOMM Host.
2. Enter the DSName in the command line and press Enter Key.
3. Enter V before the VSAM file and press Enter Key.
4. It will display “Data set in use.”
Note: When the VSAM file is connected online, we cannot browse or read the data on the VSAM file.

Step-8: Verification of duplicate loaded on VSAM from the client.
Here, the user adds the same data into the VSAM file, which will fail with a duplicate data error code.

Thus, the data is added to the VSAM file online with a VSAM connector server process.
Dionne A Nerissa
QA - Senior Software Engineer