Example 1
Assume all the branches have been defined under the relevant regional managements. The following example describes how the decollating instructions are defined. Consider a report which contains the following string beginning in line 2 column 120:
BRANCH nnn (where nnn is the branch number)
One way of defining the decollation criteria for such a report is:
Figure 457 Defining Decollation Criteria and Use of the Recipient Tree – Example 1
WHEN LINE 00002 - 00002 COL 00120 - 00129 PRINT REF NXT CT AND/OR
STRING BRANCH 129
DO USER = BR129 LVL LINE COL - S A T
SYNONYM = CONCAT =
DO
WHEN LINE 00002 - 00002 COL 00120 - 00129 PRINT REF NXT CT AND/OR
STRING BRANCH 130
DO USER = BR130 LVL LINE COL - S A T
SYNONYM = CONCAT =
DO
WHEN LINE 00002 - 00002 COL 00120 - 00129 PRINT REF NXT CT AND/OR
STRING BRANCH 131
DO USER = BR131 LVL LINE COL - S A T
.
.
.
This method requires a lot of work. A similar definition must be used for every report which is distributed to the branches. When a new branch is added, it must be added to all the report definitions. This method of defining report decollating parameters is used by most report distribution systems.
The Recipient Tree provides a better solution for this problem. It is possible to define a synonym for each branch that contains the branch number. For example:
A synonym is added to the user definition in the tree:
25 BR129 The north county branch
SYNONYM 129
The report decollating criteria are defined as:
WHEN LINE 00002 - 00002 COL 00120 - 00125 PRINT REF NXT CT AND/OR
STRING BRANCH
DO USER = * LVL 25 LINE COL 127 - 129 S T
SYNONYM = CONCAT =
The effect of this definition is as follows:
Example 2
Our sample bank has old reports which do not contain the branch number, but rather the old branch name (in text format). To solve this problem, only a small manipulation of the Recipient Tree is required. For each branch, define an additional synonym containing the name of the branch in text format. The synonym can have a maximum of 20 characters and can contain blanks.
For example:
25 BR129 The north county branch
SYNONYM 129
SYNONYM North County
As you can see, using the Recipient Tree and the decollating criteria is quite simple and the parameters can easily be updated and maintained.
The Recipient Tree provides a default security feature. Because the users are organized in a tree, the regional manager is allowed (by default) to view all the reports of the branches in their region. This may be very helpful for daily operations. For example, the regional manager can review the status of a certain account (in the branch’s report) without printing a single copy of the report.
Example 3
Each morning the bank branch receives bags full of mail and reports. Someone at the branch has to sort them according to the branch department which handles them (for example, loans, foreign currency, savings). This process takes time and security leaks can occur when certain data should remain confidential between departments. Because Control-V allows the bank workers to view reports online, the potential for a security leak can be a real factor to consider. It would be much better if the package of reports arriving to the branch each day could be sorted according to the different departments in the branch, with each worker only being able to view that department's reports. This can be done using Control-V.
"Primitive" Method
Define the branch departments as users in the tree and specify a WHEN statement for each department. Example of the tree:
Figure 458 Defining Decollation Criteria and Use of the Recipient Tree – Primitive Method – Example 3
25 BR129 The north county branch
SYNONYM 129
SYNONYM North County
30 BR129LO The Loans department
30 BR129FC The Foreign Currency department
30 BR129SA The Savings department
Example of WHEN statement specifications:
WHEN LINE 00002 - 00002 COL 00120 - 00129 PRINT REF NXT CT AND/OR
STRING BRANCH 129
DO USER = BR129LO LVL LINE COL - S A T
SYNONYM = CONCAT =
DO
WHEN LINE 00002 - 00002 COL 00120 - 00129 PRINT REF NXT CT AND/OR
STRING BRANCH 130
DO USER = BR129LO LVL LINE COL - S A T
SYNONYM = CONCAT =
DO
WHEN LINE 00002 - 00002 COL 00120 - 00129 PRINT REF NXT CT AND/OR
STRING BRANCH 131
DO USER = BR130LO LVL LINE COL - S A T
As you can see, we now have the same problem discussed in Example 1. We have to define a specific definition for each branch department. This problem can be avoided if the Recipient Tree is used to do the job.
"Better" Method
Define a synonym for each branch department:
Figure 459 Defining Decollation Criteria and Use of the Recipient Tree – "Better" Method – Example 3
25 BR129 The north county branch
SYNONYM 129
SYNONYM North County
30 BR129LO The Loans department
SYNONYM BR-LOANS
30 BR129FC The Foreign Currency department
SYNONYM BR-FOREIGN-CURRENCY
30 BR129SA The Saving department
SYNONYM BR-SAVINGS
The same synonyms are then defined for all the branch departments in the bank. For example:
25 BR129
30 BR129SA The Savings department
SYNONYM BR-SAVINGS
25 BR130
30 BR130SA The Savings department
SYNONYM BR-SAVINGS
25 BR131
30 BR131SA The Savings department
SYNONYM BR-SAVINGS
Example of decollation criteria:
WHEN LINE 00001 - 00001 COL 00020 - 00100 PRINT REF NXT CT AND/OR
STRING = NEW SAVINGS ACCOUNTS FOR
DO
WHEN LINE 00002 - 00002 COL 00120 - 00125 PRINT REF NXT CT AND/OR
STRING = BRANCH
DO USER = * LVL 25 LINE 002 COL 127 - 129 S T
SYNONYM = CONCAT =
DO USER = BR-SAVINGS LVL 30 LINE COL - S A T
SYNONYM = CONCAT =
DO NAME = NEW-SAVINGS_ACC LINE COL -
The report is identified by two WHEN statements with an AND relation between them. The branch (level 25) name is taken from the contents of the report. A user named BR-SAVINGS should also get the report. A search is carried out under the branch in the tree for a recipient whose name (or synonym) is BR-SAVINGS. If such a user is located under the branch, then that user receives the report. Using this simple approach, the reports can be decollated and packaged according to the branch departments.
Note: In the previous example, it is essential that all the branches contain the synonym. Otherwise, when Control-V does not find user BR-SAVINGS under a branch, it looks for it under that branch’s siblings in the Recipient Tree (that is, under other branches that perhaps should not receive the report). See Example 4.
Example 4
As illustrated in Example 3, one does not need to type many instructions in order to specify complex decollation criteria. However, if that method is used as described, it requires very careful maintenance of the Recipient Tree. An error in the Recipient Tree could result in a distribution error. It is possible to overcome this problem by using the *FORCE– option.
If the DO USER statement starts with the string *FORCE– followed by a user name or *, it means some special processing should be performed by Control-V. It forces the user or level specified in the statement. It prevents Control-V from searching the recipient tree above the user defined in the *FORCE statement. The decollation criteria specified in Example 3 should be:
Figure 460 Defining Decollation Criteria – Example 4
WHEN LINE 00001 - 00001 COL 00020 - 00100 PRINT REF NXT CT AND/OR
STRING = NEW SAVINGS ACCOUNTS FOR
DO
WHEN LINE 00002 - 00002 COL 00120 - 00125 PRINT REF NXT CT AND/OR
STRING = BRANCH
DO USER = *FORCE-* LVL 25 LINE 002 COL 127 - 129 S T
SYNONYM = CONCAT =
DO USER = BR-SAVINGS LVL 30 LINE COL - S A T
SYNONYM = CONCAT =
DO NAME = NEW-SAVINGS_ACC LINE COL -
If Control-V finds a branch (level 25) without a BR-SAVINGS department under it (level 30), the search of the tree is forced to stop at the branch (level 25). The report page is distributed to the branch itself.
The use of the *FORCE– option is highly recommended when the identification of the user is performed by a combination of more than one USER statement. Notice the use of the *FORCE option in Example 5.
Example 5 – Use of User Exit CTDX016
Assume the following (partial) distribution list:
Figure 461 Use of User Exit CTDX016 – Example 5
CORP CENTER NUMBERSUSER
835 1060GUST
835 1200-1281GUST
835 1400-1450GUST
835 1360-1399RIJNVIS
835 2100-2120HAMVD
835 2190-2199HAMVD
835 2300-2379HAMVD
835 8600-8620HAMVD
The above specifies that all reports for corporation 835 with center numbers 1200 through 1281 should go to user GUST, while all reports for corporation 835 with center numbers 8600 through 8620 should go to user HAMVD. Although it is possible to build a user tree with thousands of synonym entries, it is not recommended (and not convenient).
An alternative solution is illustrated in the following sample tree:
Figure 462 Use of User Exit CTDX016, Alternate Solution – Example 5
30 835BROER This is the definition for corporation 835
SYNONYM BROER
SYNONYM 835
40 835GUST
SYNONYM GUST
SYNONYM 1060
SYNONYM 1200 TO 1281
SYNONYM 1400 TO 1450
40 835RIJNV
SYNONYM RIJNVIS
SYNONYM 1360 TO 1399
40 835HAMVD
SYNONYM HAMVD
SYNONYM 2100 TO 2120
SYNONYM 2190 TO 2199
SYNONYM 2300 TO 2379
SYNONYM 8600 TO 8620
Assume the following sample report decollating mission:
WHEN LINE - COL - PRINT REF NXT CT AND/OR
STRING =
DO USER = *FORCE-* LVL 30 LINE 007 COL 001 - 003 S T
SYNONYM = CONCAT =
DO USER = * LVL 40 LINE 012 COL 001 - 004 S T
SYNONYM = CONCAT =
DO LINE COL -
Under normal user and synonym search rules, if line 12 position 1-4 contains the string 8611 (for example), the user name is not located in the tree and the page is directed to the default user.
However, you can use Control-V Exit CTDX016 to overcome this problem. The exit is activated when a string from the report is compared with a recipient name or synonym in the tree. The exit can check that 8611 is between 8600 and 8620 and OK the user identification for HAMVD.
Notice the use of the *FORCE option for level 30. If for some reason, a center number is not located under the corporation in the tree (for example, because somebody forgot to update the tree with a newly opened center), then the report is distributed to the corporation. The tree is not searched for a center with the same number under another corporation.
Example 6
A certain page in the report has to be sent to all the branches (that is, many copies of the same page are needed). This requirement is common to many reports. What is the best way to solve the problem?
"Primitive" Method
Report decollating parameters:
Figure 463 Defining Decollation Criteria and Use of the Recipient Tree – "Primitive" Method – Example 6
WHEN LINE 00001 - 00001 COL 00020 - 00100 PRINT REF NXT CT AND/OR
STRING = FOREIGN CURRENCY RATES
DO NAME = FC-RATES LINE COL -
DO USER = BR129FC LVL 30 LINE COL - S A T
SYNONYM = CONCAT =
DO USER = BR130FC LVL 30 LINE COL - S A T
SYNONYM = CONCAT =
DO USER = BR131FC LVL 30 LINE COL - S A T
SYNONYM = CONCAT =
This presents the same problem again. It requires that you repeat all the user names for all the report pages that have to be distributed to a large number of users.
"Better" Method
It is possible to define a generic user name (such as BRANCHES). This name defines decollation criteria for a large number of users (in our case all the foreign currency branch departments in the bank). For example:
Figure 464 Defining Decollation Criteria and Use of the Recipient Tree – "Better" Method – Example 6
WHEN LINE 00001 - 00001 COL 00020 - 00100 PRINT REF NXT CT AND/OR
STRING = FOREIGN CURRENCY RATES
DO USER = *BRANCHES LINE COL -
For more details about defining generic user name lists, see the Control-D and Control-V chapter of the INCONTROL for z/OS Administrator Guide, and see Generic User Name.
Parent Topic |