Hi Ursula, Steve, Douglas. First of all, thank you for your comments.
48 hours before I believed Uexit4 was everything I needed. Now I’m not sure.
Anyway, let me explain a bit more about what I’ve done.
How it all began:
Observing the Natural User Sessions (SYSTP), I’ve noted several copies of two or three programs running for more than a minute, and at times when this happened, the response time of the others got worse, reaching a point where customers started to complain. So, I’ve selected some of those “bad guys” to investigate the possible reasons of the high response time. I noticed they were not too complex. In common, they just had access to the same Adabas file.
Change the logic of the programs was possible but time consuming, and I had to have the cooperation of others. What else could I do?.. investigate what could be done in terms of Adabas.
So, I developed a program to replicate in lab a situation with a READ instruction similar to those of production. In this way I could validate the three criteria I’ve mentioned earlier, that I recall here:
(A) Elimination of obsolete fields in the FDT*;
(B) Reordering the fields of FDT;
(C) Sorting files by the most commonly used descriptors.
* 99 fields has been removed from FDT. But, after the test I found that there is more fields to remove.
These are the results:
Adabas CPU consumption obtained in the execution of the sample program.
Original After (A) After (A+B) After(A+B+C) %Reduction in CPU
data on disk: 8,74 7,63 6,21 4,94 43,5%
data on BP: 7,69 6,75 5,23 4,60 40,2%
Based on these results, I consider useful to apply the three criteria.
I really don’t know if the cpu reduction (item A) is due to I/O reduction or due to the Adabas necessity of “jump” over the fields on the DS until it gets what it needs, because approximately 50% of the fields removed were positioned after the position 161 in FDT. (see position of used fields as comments in the sample program)
The sample program:
0010 DEFINE DATA LOCAL
0020 1 SAE VIEW OF SAEW-EXERCICIO
0030 2 EXE-VINCULO /* (FDT original position: 152)
0040 2 EXE-GPO-NRE /* (FDT original position: 153)
0050 2 EXE-MUN-EST /* (FDT original position: 154)
0060 2 EXE-ENSINO /* (FDT original position: 155)
0070 2 EXE-FUNCAO /* (FDT original position: 156)
0080 2 EXE-CH /* (FDT original position: 157)
0090 2 EXE-ATO /* (FDT original position: 158)
0100 2 EXE-DATA-ATO /* (FDT original position: 159)
0110 2 EXE-SIT-REG /* (FDT original position: 160)
0120 2 EXE-MOT-CANC /* (FDT original position: 161)
0130 2 EXE-RG-AFA-NEW /* (FDT original position: 373)
0140 2 EXE-TURNO /* (FDT original position: 384)
0150 2 EXE-RG-LF-NEW /* (FDT original position: 372)
0160 *
0170 1 XX (P7)
0180 END-DEFINE
0190 *
0200 READ SAE BY EXE-SUP-MUN-NEW
0210 ADD 1 TO XX
0220 IF XX GT 100000
0230 ESCAPE BOTTOM
0240 END-IF
0250 END-READ
0260 END
With respect to Ursula’ comments, I would like to add that all the maintenances will be performed primarily in the DDM. We have a Data Dictionary (not Predict, but a better one :D). Unfortunately, not all the things registred in our data dictionary, such as removing of fields, are replicated in Adabas. And, not all the things are entered to the Dictionary.
I don’t have others accessing Adabas. Just Natural.
With respect to the Steve’ comments, I would say that last year we work to eliminate fields of views (from internal and external data areas), when those were not referenced in the code. The results were impressive.
With respect to the Douglas’ comments, I hope I explained everything. However, if I have time, I’ll put the fields referenced by my sample program at the end of the file, the far opposite of where they are today, just to check the results.
Finnaly, I believe that Uexit4 is the right place to construct a generic solution so that new fields can be added to any file in any database and no new maintenance in the exit would be necessary. That is the good.
The bad is that the use of the multi-fetch feature will mask the real values accounted for by the exit.
Probably I’ll separate the work in two steps:
- 1. Start immediately doing the job, using the available information;
2. collect more information over a year and redo the job.