a. Fixed-length records with unspanned blocking
b. Fixed-length records with spanned blocking
c. Variable-length records with variable-length fields and spanned blocking
d. Variable-length records with repeating groups and spanned blocking
e. Variable-length records with optional fields and spanned blocking
f. Variable-length records that allow all three cases in parts c, d, and
Notes:
ints are 4 bytes delimiter of records are 1 byte record ends are 1 byte so record is exactly 25B
Sudo Code:
(ptr)starting_location=100;
record_to_access = x;
x = 5;
y = 2;
record_size=25;
(ptr)record_field_to_access = starting_location+(record_size*record_to_access)+y;
Notes:
assuming delimiters are '/' and each pointer starts with '#' (which is arbitrary) assume the fifth record is in another blocking than the starting point
Sudo Code:
(ptr)starting_location=100;
record_to_access = x;
x = 5;
y = 2;
record_size=25;
loop{
(every byte look for a '#' if '#' is present, current location = the pointer following it after every 25B, increment z by 1 and stop when other loop is finsihed;)
if (z == 4);
{
}
loop{
(increment through record byte by byte, if current location contains '#', go back to the following pointer when we're at the correct field;)
}
}
18.19