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: November 25, 2003 01:30 PM Tuesday; Rod Welch

SDS improve system of assigning filenames to new tasks in Schedule.

1...Summary/Objective
2...04702 Modify Archive Pointers to Update Schedule Task Number

ACTION ITEMS.................. Click here to comment!

1...Background on 950830 discusses work, ref SDS 3 0001, to fix a problem

CONTACTS 

SUBJECTS
Revise System Assign Number New Tasks Revise Design to Avoid Recylcin
Task Numbers Increment Last Number in the Schedule Rather than Allowi
Schedule New SDS Task Filename in Reset Counter Recycle Numbers to Av

0605 -
0605 -    ..
0606 - Summary/Objective
0607 -
060701 - Follow up ref SDS 3 0000, ref SDS 2 0000.
060702 -
060703 - Tried to develop stronger solution for assigning filenames to new
060704 - tasks in the Schedule that avoids prior problems of the numbers
060705 - getting out of sync.  The work today strives for a self-maintaining
060706 - system.  Not sure what happens though if files on the disk get out of
060707 - sync with the list in the Schedule.  May have a situation where a
060708 - filename gets lost for some reason and then the next new task gets
060709 - assigned to that filename.  The user expects to open a blank file, but
060710 - instead opens something lost or abandoned.  If this occurs, seems like
060711 - the worst case scenario is that the new tasks require editing to
060712 - remove a bunch of stuff, or the task can be deleted and a new one
060713 - opened.  This reduces slightly the opportunity to recover when a task
060714 - gets lost.  This problem has almost never occurred in 20 years, so the
060715 - risk seems small.  If a problem does occur, everything in 00 is backed
060716 - up everyday.
060717 -
060718 -
060719 -
060721 -  ..
0608 -
0609 -
0610 - Progress
0611 -
061101 - There has been a continuing issue about setting the number for new
061102 - tasks in the Schedule.  This is currently maintained by macro 95 in
061103 - 000005, ref OF 2 165O
061105 -  ..
061106 - Background on 950830 discusses work, ref SDS 3 0001, to fix a problem
061107 - noticed earlier on 950218, ref SDS 2 0001, and based on experience the
061108 - day before on 950217. ref SDS 1 RV9I  More recently, on 030426 Gary
061109 - reported the Schedule list of tasks was out of sync with the records
061110 - on the disk. ref SDS 4 0001
061112 -  ..
061113 - The filename is assigned to new tasks by the following code....
061115 -  ..
061116 - Line 3050, ref OF 2 FQ6L, -label 18aq in 000005
061117 -
061118 -    macro 22
061119 -    top
061120 -    strcnt 1 4
061121 -    addcnt 1 1
061122 -    -if @1 > 9999 setcnt 1 2
061123 -    macro 958
061124 -
061125 -        macro 22 saves the cursor location for entering a new task. top
061126 -        jumps to the location where the new task numbers are
061127 -        maintained.  strcnt 1 4 gets the existing number.  addcnt 1 1
061128 -        increments the new number.  When the number exceeds 99999,
061129 -        which is the limit of the field, the number is recycled back to
061130 -        2.  macro 958 posts the new number for evaluation on the next
061131 -        pass.
061133 -         ..
061134 -        Under this scheme, the number continues to increment until
061135 -        99999.
061137 -         ..
061138 -        Want to change this so that the number never has to recycle.
061140 -         ..
061141 -        This can be accomplished by resetting the number at the top of
061142 -        the Schedule to the last number in the inventory each day when
061143 -        SDS is started.  Macro file 04702 can make this assessment and
061144 -        reset the number after archiving.
061146 -         ..
061147 -        An alternative method would be to inventory the list each time
061148 -        a new task is created and use the next number.  This takes
061149 -        compiled code in 000005 macro 95, which is in short supply.
061150 -
061151 -
061152 -
061153 -
061154 -
061155 -
0612 -

SUBJECTS
Archiving Diary Records, and SAA

0703 -
0704 - 8675
070501 -  ..
070502 - 04702  Modify Archive Pointers to Update Schedule Task Number
070503 -
070505 -  ..
070506 - Line 1100, ref OF 1 QT5M, -label Exectv in 04702 about 50 lines below
070507 -
070508 -    e d:\sd\08\UUUUU\00\00
070509 -
070510 -        Launch op opens the Schedule 00 file.
070511 -
070512 -
070514 -  ..
070515 - Line 1180, ref OF 1 EW9J, -label Exectv in 03702 about 120 lines below
070516 -
070517 -    up
070518 -    strcnt 1 4
070519 -    -if @1 = 1 -goto 96rk
070520 -
070521 -        Code initially checks the filename for SAA to verify it is
070522 -        correct and fixes it if there is a mistake.  If no mistake
070523 -        procede to archive current SDS records. -goto 96rk
070524 -
070526 -  ..
070527 - Line 2220, ref OF 1 KL4L, -label bRDATE in 04702
070528 -
070529 -    -label bRDATE
070530 -    purge 1T2
070531 -    top
070532 -    immed dd
070533 -
070534 -        This code runs after backing up the system, after archiving SDS
070535 -        performed records, and before running 25.bat to update
070536 -        reference pointers.  purge 1T2 ends op to archive.  Start at
070537 -        the top.  immed dd begins to delete lines for prior date.
070538 -
070539 -
070541 -  ..
070542 - Line 2240, ref OF 1 3C5L, -label bRDATE in 04702 about 40 lines below
070543 -
070544 -    setcnt 1 0
070545 -    line @120
070546 -    -gosub lptnUm............................ ref SDS 0 JN7M
070547 -
070548 -        New code starts task number at 1; line @120 jumps to the line
070549 -        in the Schedule for today's date where all pending tasks have
070550 -        been copied.  -gosub lptnUm calls new routine to set the task
070551 -        number to the highest number in the Schedule. ref SDS 0 JN7M
070552 -        The next new task will increment from this number for the
070553 -        filename.  After the routine runs the first time,
070554 -
070555 -
070557 -  ..
070558 - Line 2260, ref OF 1 JO7J, -label SrtS in 04702
070559 -
070560 -    z 1 1
070561 -    errorcnt 0 0
070562 -    -label SrtS
070563 -    nb
070564 -    -if @0 > 0 -goto NtnD
070565 -    -gosub lpnST
070566 -    -goto SrtS............................... ref SDS 0 OL90
070567 -
070568 -        After processing all tasks for the current date, z 1 1 and
070569 -        errorcnt 0 0 set up to look for other tasks that may be
070570 -        scheduled for future dates.  nb jumps to next scheduled task.
070571 -        -if @0 > 0 -goto NtnD ends the routine when all tasks have been
070572 -        processed.  -gosub lpnST calls new subroutine to increament the
070573 -        filename task number. ref SDS 0 JN7M  -goto SrtS cycles through
070574 -        all the tasks in the Schedule. ref SDS 0 OL90
070575 -
070576 -
070578 -  ..
070579 - Line 2270, ref OF 1 4T9H, -label NtnD in 04702
070580 -
070581 -    -label NtnD
070582 -    line @120
070583 -    down
070584 -    immed dd
070585 -    macro 958
070586 -
070587 -        After the highest task number has been found, per above, then
070588 -        return to current date.  down scrolls down to top of lines for
070589 -        prior dates, immed dd completes deleting all lines for prior
070590 -        dates, so the Schedule begins with the current date.  macro 958
070591 -        enters the task number determined by the new process.
070592 -
070593 -
070595 -  ..
070596 - Line 2210, ref OF 1 RQVS, -label lptnUm in 04702
070597 -
070598 -    -label lptnUm
070599 -    up
070600 -
070601 -    -label lpnST
070602 -    strcnt 2 4
070603 -    -if @2 > @1 setcnt 1 @2
070604 -    loc_cur 0 8
070605 -    chrcnt 3 0
070606 -    loc_cur 0 1
070607 -    -if @3 = 32 -goto lptnUm
070608 -    -return
070609 -
070610 -        This is new code to scroll up looking for the last highest
070611 -        number and it will be used for the number of the next new task.
070612 -        Check col
070613 -
070614 -
070615 -
070616 -
070617 -
070618 -
070619 -
070620 -
070621 -
070622 -
070623 -
070624 -
0707 -