Professional Documents
Culture Documents
ADABAS Access
* Select the correct access method. * Code it efficiently.
Natural Commands
READ Physical
Data Storage
Use when reading more than 20% of the records in a file Generally least expensive method to read all records Only update if Potential double updates will not be a problem
Access to Data Storage only. Records returned in the order they are stored physically in Data Storage
* Can results in 4 I/Os (1 per block) & 14 ADABAS Calls * Order of records returned: 2,1,14,3,5,12,4,6,7,8,11,9,20,21
4
Natural Commands
READ by ISN Address Converter
Data Storage
Use when reading more than 20% and some updating ISN use ensures no double updates & no missed updates ISN may be used as restart point Second fastest access method
Used when updating file but not one for one with the outside loop
5
Access to Address Converter & Data Storage Records returned in ascending ISN order
125 128 128 125 126 126 0 127 125 126 0 127 0 127 0 127 0 128 0 0 128
Natural Commands
READ Logical
1
Inverted List
Address Converter
3
Data Storage
Use when reading 1 record or a small range of records Returned in sorted order by index read Be careful when updating read key fields
7
Returns records in sequence by Descriptor, Sub-, or Super-Descriptor Accesses Inverted List, Address Converter, and Data Storage Useful for reading small portion of a file Consistent performance
8
2 0 0
1 0
4 0
1 0
2 0
2 0
4 0
1 0
3 0
0 0
9 ADAMS 3 CARLSON
FREE
7 CARLSON FREE
Natural Commands
FIND
Work
2
Data Storage
10
Natural Commands
FIND
one or more selection criteria Returns records in *ISN sequence A FIND which selects a set of records > 51 will generate I/O to work part 3 Complex FINDs can generate I/O to work part 2
11
Natural Commands
FIND Simple find (algorithm 1):
LAST-NAME = BROWN
Moderate complexity (algorithm 2): LAST-NAME = BROWN OR JONES Complex FIND (algorithm 4): FIND PERSONNEL WITH AGE > #AGE AND SEX = #SEX AND VET-STATUS = V
12
14
125 126
126 0
127 125
126 0
127 0
127 0
127 0
128 0
0 128
15
126 0
127 125
126 0
127 0
127 0
16
125 126
126 0
127 125
126 0
127 0
127 0
127 0
128 0
0 128
17
125 126
126 0
127 125
126 0
127 0
127 0
18
Access Inverted List for ADAMS, BAKER, CHARLES, DAVENPORT, and DAVIS Form ISN list: 1,2,3,4,5,6,7,8,9,11,12,14,20,21. This merging is additional work not required by READ LOGICAL. Access Address Converter and Data Storage. Records NOT returned in name order!
19
Natural Commands
HISTOGRAM Inverted List
21
F M
22
NUMBER
23
Direct Calls
How records are accessed by ADABAS
Direct Call
L1 L2 L3 L9
Action Performed
READ by ISN READ physical READ logical HISTOGRAM
24
Direct Calls
How records are accessed by ADABAS
Direct Call
L4 L5 L6
Action Performed
READ by ISN w/ hold READ physical w/ hold READ logical w/ hold
25
Direct Calls
How records are accessed by ADABAS
Direct Call
S1 S4 A1/A4 N1/N4 E1/E4
26
Action Performed
FIND FIND w/ hold UPDATE STORE DELETE
READ BY ISN - More than 20% of file and updates FIND - Multiple, non-contiguous values of
descriptor; Small set of records; sequence not important
28
Questions
?
29