THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700
rodwelch@pacbell.net
S U M M A R Y
DIARY: December 17, 2003 04:24 PM Wednesday;
Rod Welch
SDS added code to remove duplicate references when F2 save is called.
1...Summary/Objective
2...Duplicate Reference Pointers Removed with Sort Macro 1451
3...0702053 Call Macro 1451 to Sort and Remove Duplicate Keys
..............
Click here to comment!
CONTACTS
SUBJECTS
Diary Summary Duplicate Record Descriptions Needs to be Maintained Wh
Diary Summary Fails to List Records Created Day Before After Launchin
0504 -
0504 - ..
0505 - Summary/Objective
0506 -
050601 - Follow up ref SDS 3 0000. ref SDS 2 0000.
050602 -
050603 - Gary reported a new problem with archiving SDS Reference pointers, and
050604 - I initially seemed to confirm the problem. Review suggests the code
050605 - is actually okay. ref SDS 0 EV6M Took this occassion to improve the
050606 - sort routine to also remove duplicate keys when maintaining SDS
050607 - Reference data bases. This is most visible by avoiding multiple lines
050608 - showing up in the Diary Summary for the same record, which occurs from
050609 - time to time, and takes extra time to fix.
050610 -
050611 -
050612 -
050613 -
050615 - ..
0507 -
0508 -
0509 - Progress
0510 -
051001 - Gary called today and reported that when he launched SDS this morning,
051002 - the records created yesterday did not show up in the Diary Summary.
051004 - ..
051005 - While we talked, I ran SDS to launch Gary's records, and got the same
051006 - result. This suggests that the SDS Reference data bases were not
051007 - updated. which seemed to confirm a new problem on launching SDS.
051009 - ..
051010 - This is annomolous, because the launch operation controlled by 04702
051011 - does not update SDS Reference data bases. This task is performed
051012 - solely by 0702051, now in combination with 0702053, as of 031203.
051013 - ref SDS 2 VP4I
051015 - ..
051016 - To investigate, Gary's records were restored back to the status for
051017 - yesterday, using data saved with the launch backup operation. Each
051018 - current diary record in the Schedule was then opened and F2 was used
051019 - to run the save op, beginning with macro 142, which calls 0702051, and
051020 - ultimately 0702053 to update Reference data bases.
051022 - ..
051023 - After saving all of the current diary records in Gary's Schedule, the
051024 - session was closed. Then launched SDS again to open Gary's Schedule.
051026 - ..
051027 - This time, when the Schedule came up and F3 was pressed, the records
051028 - for yesterday were listed correctly in the Diary Summary, except there
051029 - were two entries for Schedule and Diary Summary. These results,
051030 - suggest the SDS code is functioning correctly.
051032 - ..
051033 - I think/hope that what caused the effects Gary and I both experienced
051034 - is the work performed yesterday, to investigate the problem of
051035 - creating corrupted data base files when there are no lines for a
051036 - particular Reference type, specifically documents and contacts. For
051037 - testing purposes Reference data base files were deleted after they
051038 - were created when Gary used F2 to save the new records. Since those
051039 - records were not the direct subject of the work and testing, they did
051040 - not get restored after the other problem was diagnosed and corrected.
051042 - ..
051043 - Based on this analysis, there are no corrections to make on SDS code
051044 - for this matter.
051045 -
051046 -
051047 -
0511 -
SUBJECTS
Duplicate References Removed Sort Save, Macro 145 Macro 1451 Macro Fi
0703 -
070401 - ..
070402 - Duplicate Reference Pointers Removed with Sort Macro 1451
070403 -
070404 - Decided to modify the code in macro 1451 that is called as of now by
070405 - macro 0702053, reported on 031203, ref SDS 2 FG4J, as part of the F2
070406 - "save" operation managed by 0702051, as explained on 031203.
070407 - ref SDS 2 VP4I
070409 - ..
070410 - Macro 1451 sorts Reference data base files so that duplicate keys are
070411 - deleted. Turns out the code to do this is already pretty much in
070412 - place, because the feature has been used for some time to maintain SDS
070413 - record Control Fields, developed on 010810. ref SDS 1 0001
070414 -
070415 -
070417 - ..
070418 - 0702053 Call Macro 1451 to Sort and Remove Duplicate Keys
070419 -
070420 - Follow up ref SDS 2 FG4J.
070421 -
070422 - Line 670, ref OF 1 4590, -label getIt in 0702053
070423 -
070424 - -label getIt
070425 - setcnt 0 0
070426 - setcnt 201 666
070427 - macro 1451
070428 -
070429 - Macro 1451 sorts the lines in Reference data base files; added
070430 - setcnt 201 666 to create a flag for macro 1451 to delete
070431 - duplicate keys in SDS References data base files, per below.
070432 - ref SDS 0 G997
070434 - ..
070435 - The problem of duplicate keys shows up when multiple entries
070436 - occur in the Diary Summary, usually this is the Schedule and
070437 - Diary sumary line. The other references are typically deleted
070438 - by the code in 0702053 that deletes existing entries in a data
070439 - base file. ref OF 1 C44G The line for Schedule and Diary
070440 - Summary however, is never, or rarely, processed by F2 save, and
070441 - so removing duplicate keys by 0702053 does not maintain this
070442 - part of the SDS record description reference data base.
070444 - ..
070445 - Additionally, it seems that despite the design to maintain
070446 - reference data base files, per above, ref SDS 0 W26I, sometimes
070447 - a problem of duplicates still occurs. Therefore, today, will
070448 - solve the problem by modifying macro 1451 to remove duplicate
070449 - keys, even though this task is mostly redundant.
070450 -
070451 -
070453 - ..
070454 - Line 3180, ref OF 2 2592, -entry 1451 in 000008
070455 -
070456 - -entry 1451
070457 - top
070458 - z 1 27
070459 - z 1 28
070461 - ..
070462 - This is called by 0702053 to sort the list of SDS record
070463 - Reference lines in the data base files. z 1 27 sets the span
070464 - of lines to sort for the record ID and the primary line number
070465 - key, which makes lines unique in SDS records.
070466 -
070467 - [On 040330 changed z 1 27 to 1 28. ref SDS 4 KI98
070469 - ..
070470 - Up until today, the code has only removed duplicate lines for
070471 - Control Fields, not sure why this was done that way, unless it
070472 - took a few extra lines of code, and the design of the program
070473 - generally removes duplicates for data base files, as described
070474 - above. ref SDS 0 W26I Since as further noted, there is a
070475 - particular exception for Schedule and Diary summary line, and
070476 - since the problem seems to occur in other situations
070477 - occassoinally, and since further that recent changes have
070478 - recovered some compiler space, then will add support today for
070479 - removing duplicate keys in the SDS Reference data base files.
070480 -
070481 -
070483 - ..
070484 - Line 4210, ref OF 2 1734, -entry 1453 in 000008
070485 -
070486 - -entry 1453
070487 - setcnt 202 888
070488 - -gosub setup8
070489 -
070490 - -entry 1453 is just an extension of macro 1451; setcnt 202 888
070491 - creates a flag for subroutine setup8, and so -gosub setup8
070492 - calls the code that actually sorts, and now deletes duplicate
070493 - keys.
070494 -
070495 -
070497 - ..
070498 - Line 3240, ref OF 2 N77M, -label setup8 in 000008
070499 -
070500 - -label setup8
070501 - errorcnt 0 0
070502 - -label lp12q
070503 -
070504 - Start main subroutine to sort and remove duplicate keys;
070505 - errorcnt 0 0 sets up to determine when the thing is over by
070506 - recognizing the end of the file. -label lp12q is the main loop
070507 - for processing each line in the file.
070508 -
070510 - ..
070511 - Line 3420, ref OF 2 5H3H, -label rrr8 in 000008 about 50 lines below
070512 -
070513 - -label rrr8
070514 - ..
070515 - ..
070516 - ..
070517 - -if @201 = 666 -if @1 = 0 -goto rdrdbl.......... ref SDS 0 EX59
070518 -
070519 - Added this new code today based on flag 201 = 666 set in
070520 - 0702053 when macro 1453 is called, per above. ref SDS 0 2M4O
070521 -
070522 -
070524 - ..
070525 - Line 3530, ref OF 2 MF5J, -label ltst7 in 000008 about 20 lines below
070526 -
070527 - -label ltst7
070528 - immed t
070529 - -if @201 != 919 -if @202 != 666 -goto lp12q2
070530 - -if @1 != 0 -goto lp12q2
070531 -
070532 - At this point the code has found a line that is not less than
070533 - the initial line, and so is moving the line back up the list
070534 - until it finds a line less than or equal. If this is not a
070535 - Control Field op, or is not updating SDS Reference data bases
070536 - for F2 save op calling 0702053 from 0702051, then it is over,
070537 - process this line starting back down the list with zonereps
070538 - command; similarly, if the lines are not identical, then start
070539 - the process over again. -goto lp12q2. ref SDS 0 G984
070541 - ..
070542 - rel_cur 1 0
070543 - -if @201 = 919 -gosub dlDup...................
070544 -
070545 - Lines are identical, so move the cursor down a line and for
070546 - Control Field sort, go see if based on criteria in Function
070547 - field, the lines are identical, and in that case delete
070548 - duplicate line, then return.
070549 -
070550 - -if @201 = 666 -gosub dtLin..................... ref SDS 0 EX7P
070551 - rel_cur -1 0
070552 -
070553 - For maintaining SDS Reference data bases go delete duplicate,
070554 - then return. Move cursor back to initial line to start
070555 - process over again.
070556 -
070558 - ..
070559 - Line 3630, ref OF 2 U54I, -label rdrdbl in 000008
070560 -
070561 - -label rdrdbl.......................... ref SDS 0 G997
070562 - down
070563 -
070564 - This is a new -label created today for avoiding duplicate keys
070565 - in SDS Reference data base files. This one is for the process
070566 - going down the file. ref SDS 0 G997
070567 -
070569 - ..
070570 - -label dtLin
070571 - immed d
070572 - -if @201 = 666 -goto lp12q
070573 - -return
070574 -
070575 - If maintaining SDS record Reference data bases calling macro
070576 - 1451 in macro file 0702053 from main save function F2 that
070577 - stats with macro file 0702051, then this deletes duplicate
070578 - keys, so go process the next line. 201 666 is set in 0702052
070579 - below -label getIt
070580 -
070581 -
070582 -
070583 -
070584 -
070585 -
070586 -
070587 -
070588 -
070589 -
070590 -
070591 -
0706 -