Re: Migrating ISAM to Relational Database

I made the same changes (x ->xxxx and comparison) -
simlinux:~ # cob -u -C NOBOUND dw.cob
simlinux:~ # cobrun ./dw
fixed 2.98
variable 2.97

So, looks like MF SE 2.2 optimizes that better than your version.
Interesting would be to try defining vt-length
as 9(8) COMP-5.


"Rick Smith" <ricksmith@xxxxxxx> schrieb im Newsbeitrag

"Rick Smith" <ricksmith@xxxxxxx> wrote in message

"Alistair" <alistair@xxxxxxxxxxxxxxxxxxxxx> wrote in message
On 15 Apr, 03:26, "Pete Dashwood" <dashw...@xxxxxxxxxxxxxxxxxxxxxxxxx>

Huh?!! The processor time to deal with ODO is outrageous...compared

I don't wish to get caught in the crossfire between the ODO:Fixed
Length:RDB camps but I have worked with ODO (and had no problems with
it except for the continual need to recalculate field positions, etc.,
and dumps) but has any one got any empirical data to prove their case?

Not my case to prove; but ...

Using Micro Focus COBOL 3.2.24 (Jun 1994)
identification division.
program-id. A27B08.
data division.
working-storage section.
01 t-start.
03 t-start-hour pic 99.
03 t-start-minute pic 99.
03 t-start-second pic 99v99.
01 t-end.
03 t-end-hour pic 99.
03 t-end-minute pic 99.
03 t-end-second pic 99v99.
77 t-elapsed pic 9(7)v99.
77 t-elapsed-display pic z(6)9.99.

78 max-size value 8192.
01 fixed-table.
03 fixed-entry pic x occurs max-size

I changed pic x to pic x(3)

indexed by ft-index.
77 vt-length pic 9(4) comp-5 value max-size.
01 variable-table.
03 variable-entry pic x occurs 0 to max-size

I changed pic x to pic x(3)

depending on vt-length
indexed by vt-index.
77 repeat-count pic 9(8) comp-5 value 100000.
procedure division.
accept t-start from time
perform test-fixed-table
repeat-count times
accept t-end from time
display "fixed " with no advancing
perform display-elapsed
accept t-start from time
perform test-variable-table
repeat-count times
accept t-end from time
display "variable " with no advancing
perform display-elapsed
stop run
perform varying ft-index from 1 by 1
until ft-index > max-size
move space to fixed-entry (ft-index)
perform varying vt-index from 1 by 1
until vt-index > max-size

I changed max-size to vt-length (but see results, later)

move space to variable-entry (vt-index)
if t-start > t-end
move 86400 to t-elapsed
move 0 to t-elapsed
compute t-elapsed = t-elapsed
+ (t-end-hour - t-start-hour) * 3600
+ (t-end-minute - t-start-minute) * 60
+ (t-end-second - t-start-second)
move t-elapsed to t-elapsed-display
display t-elapsed-display

Results (in seconds)::
----- with BOUND directive
fixed 5.32
variable 4.89
----- with NOBOUND directive
fixed 4.89
variable 4.94

ODO appears to be slightly faster with bounds
checking and slightly slower without.

New results (in seconds):
----- with NOBOUND directive
fixed 10.00
variable 25.04

After restoring the comparison with max-size
instead of vt-length, the results were:
----- with NOBOUND directive
fixed 10.27
variable 10.27

I then added a second index to each table: ft-limit
and vt-limit, respectively. I also added an appropriate
SET statement at the beginning of the test paragraphs
and changed the comparisons to the respective limits.
The new results were:
----- with NOBOUND directive
fixed 9.83
variable 9.89

What I learned by experimentation is that, if one
tests an index against a non-index, the performance
cost for ODO can be outrageous! At least it was for
the implementation I tested. <g>