How to: Use the Multi-Threaded HLI/SU Reporting Facility Reference: |
You can use the Multi-Threaded HLI/SU Reporting Facility to process report requests. With this facility, your source machine directly accesses the FOCUS database, bypassing the sink machine and IUCV.
Note that this facility is used in read-only mode and that all modifications to the database are routed through the sink machine. In addition, a single multi-threaded SU program cannot open a file simultaneously in both read-only and read/write mode. Different FCBs must be written in order to report from and update the centrally controlled database.
In the following illustration, User 1 is using multi-threaded processing and has read-only access to the central database. Users 2 and 3 have read/write access to the central database via the sink machine.
With Multi-Threaded HLI/SU Reporting for CMS, the central database is accessed by each user as a local machine when performing operations, and as a sink machine when performing modifications. In the HLI environment, the FCB is modified to denote the parallel configuration.
In the FOCUS environment, a USE command accomplishes this. Each database must be declared twice in the USE command for multi-threaded reporting. In the example below, although the CAR database and the SALES database are accessed on different sink machines, both are available for multi threaded reporting.
USE
CAR FOCUS A ON sinkid1
CAR FOCUS B LOCAL
SALES FOCUS A ON sinkid2
SALES FOCUS C LOCAL
.
.
.
END
The keyword LOCAL indicates that the Multi-Threaded HLI/SU Reporting Facility will read the databases without going through their associated sink machines for TABLE requests. (MODIFY and Maintain requests continue to go through sink machines as if this facility had not been used.) Note that you still must tell FOCUS what sink machine controls the database, even if you plan to read the database locally with the Multi-Threaded HLI/SU Reporting Facility.
In the following example, the CAR file is rebuilt. The CAR filemode is renamed to filemode number 6:
REBUILD
REBUILD
CAR FOCUS B1
NO
CMS RENAME CAR FOCUS B1 CAR FOCUS B6
CP LINK SINKMA 191 201 RR
ACCESS 201 D
For example, assume the sink machine is running on user SINKMA, the central database disk is accessed locally as D and through the sink machine as A, and the following COBOL HLI FCB:
01 FCB
05 FCB-FN PIC X(08) VALUE SPACES.
05 FCB-FT PIC X(08) VALUE SPACES.
05 FCB-FM PIC X(04) VALUE SPACES.
05 FCB-SU PIC X(04) VALUE SPACES.
05 FCB-DN PIC X(08) VALUE SPACES.
05 FCB-SINKID PIC X(08) VALUE SPACES.
05 FILLER PIC X(28) VALUE SPACES.
05 FCB-ECHO PIC X(04) VALUE "ECHO".
05 FILLER PIC X(20) VALUE SPACES.
05 FCB-STATUS PIC S9(5) COMP-3 VALUE +0.
05 FILLER PIC X(104) VALUE SPACES.
The FCB would be set up as follows:
105-SET-UP-FCB-HLI-SU-CMS.
MOVE "CAR" TO FCB-FN.
MOVE "FOCUS" TO FCB-FT.
MOVE "A D" TO FCB-FM.
MOVE "SULO" TO FCB-SU.
MOVE "SINKMA" TO FCB-SINKID.
Note:
While you are reading the database with this facility, you will not know if someone else is changing it with a MODIFY or Maintain request. Since any report you generate will be affected by another user's changes, keep the following in mind:
If a root segment instance (or root segment of an alternate view) is deleted and re- inserted while your report is in progress, your report may show the segment instance appearing twice.
Information Builders |