Accessing CICS data from VB

Benefits of WebTek solution

The IT department of a large school district outside of Chicago needed to develop an online attendance application to allow teachers to take roll from their computer. The current system required teachers to take roll from their grade books and then attach a scantron sheet to the outside of their door. A student then picked up the sheet and the attendance was input later. Attendance data for all 12,000 students was held in a legacy CICS system at the district office.

Project requirements

Teachers in the district's five high schools wanted the new system to be fast and not take any more time from their lessons than the old system. They also wanted to be able to input new information and view current data throughout the day. The IT department and district wanted to preserve their investment in CICS. This meant that the department's six developers needed to give teachers the ability to quickly and securely access, view, and update legacy CICS data across a distributed network.

Preliminary Web approach....too many risks

The first option developers explored was providing a Web interface to allow teachers to input data from a Web browser on their computers. Developers began by looking at IBM's CICS Web Support (CWS), a facility provided with Transaction Server (TS) that allows direct Web access to CICS application and data from a Web browser. They created and tested a Web-aware CICS application that provided an HTML interface where teachers could update attendance data stored in CICS. Developers soon realized that the Web solution posed several problems:

  • Execution too slow. The Web application had to go through each student's data and then build the HTML page. Teachers complained that they had to wait too long for the screen to appear.
  • Future problems with bandwidth. A large percentage of the district's 12,000 students access the Internet every class period. This meant that any Web application would compete for bandwidth.
  • Risks of Internet access. If the district-wide network or Internet access went down, the attendance application would also go down.

A better approach....keep it local

Developers determined that the best way to avoid these issues and provide the best performance possible was to eliminate use of the Internet as much as possible from the solution.

Developers created a Visual Basic (VB) application that each teacher could run locally from his or her computer. To keep data local, developers created a Microsoft Access database and stored it on a local server in each high school rather than at the district office. Developers then wrote a simple batch program that would build a record of each student's attendance history in CICS and update the Access database every night. The VB application then accessed and displayed attendance data from the Access database.

This approach kept the application and data local, which allowed the district to avoid many of the issues found in the Web solution.

Getting new information into CICS

However, the solution wasn't complete. Teachers needed a way to update CICS data throughout the day. For example, if a student was absent the previous day and didn't provide an excuse, the student was considered truant and the application screen appeared in red. If the student arrived at some point in the day with an excuse, teachers needed a way to update the mainframe data, so the student would no longer be considered truant.

WebTek provides a solution

Developers found the solution they needed in H&W's WebTek tools for CICS. WebTek works with CWS to simplify access to CICS data. The tool that satisfied the district's need was WebTek's Pipeline for Windows. Pipeline for Widows uses an ActiveX component that allows Windows programs written in VB, C++, or C## to request and receive data from CICS. Using Pipeline for Windows, the VB application could update CICS data throughout the day. This approach limited the amount of Internet use, while still allowing teachers to keep student data current.

Streamlining signon

Developers also needed a way to speed up the signon process. They didn't want to require teachers to sign on to Novell and then to CICS when a record needed to be updated, so they implemented another WebTek tool, the URL Control Table (UCT). The UCT provides secure access to Web-aware CICS applications by replacing each application's resource components with a single name, known as a mnemonic. The mnemonic becomes part of the URL called by the VB application.

The UCT allows developers to customize access into CICS. In this case, developers customized the mnemonic to allow teachers to sign in only once.

Successful results

By using the VB application to access CICS, teachers can now quickly take attendance rather than waiting for a Web interface to appear, while still being able to update CICS data throughout the day. The district is also able to preserve its investment in CICS. This success prompted the IT department to go one step further by using WebTek Pipeline to forge an ASP connection to CICS.