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: March 7, 2004 10:07 AM Sunday; Rod Welch

SDS modify program launch to maintain current 00 directory.

1...Summary/Objective
2...Schedule 00 Directory Automatically Maintain
....Select Filenames from Schedule 00 to Compare with Files on Disk
....Supersort Spec to Merge and Sort Dir List in 00 Dir with 00 File
....Composite Sorted List Compare 00 Filenames with Files on Disk
....Lst3 Composite File Listing 00 Filenames with List from 00 Dir
....Lst3 Open and Compare to Find and Eliminate Mismatches


..............
Click here to comment!

CONTACTS 

SUBJECTS
Schedule Maintenance Needs to be Automatic to Avoid Accumulating Pre

0703 -
0703 -    ..
0704 - Summary/Objective
0705 -
070501 - Follow up ref SDS 2 0000, ref SDS 3 0000.
070502 -
070503 - Added to program launch ops a task to automatically check and maintain
070504 - the Schedule directory in sync with the list of tasks in the Schedule
070505 - 00 file.  This reduces keystrokes to save time and emotional stress
070506 - worrying about performing this task, with associated time
070507 - investigating files that in 99.99% of the cases can simply be deleted.
070508 - For time being will retain the Schedule file menu option for this,
070509 - just in case there is something about this op that needs more
070510 - attention, but is not evident today.
070511 -
070512 -      [...in another record today, developed new tools that expedite
070513 -      navigation in Knowledge Space using the organic structure of the
070514 -      Subject Index. ref SDS 5 0001
070516 -       ..
070517 -      [...in another record today, review application of Moore's Law to
070518 -      improving productivity. ref SDS 5 HW3K
070520 -       ..
070521 -      [On 040317 revised work today to create new method for code to
070522 -      maintain the Schedule 00 file with the 00 schedule directory.
070523 -      ref SDS 7 YJ7L
070524 -
070525 -
070527 -  ..
0706 -
0707 -
0708 - Problem
0709 -
070901 - Schedule 00 Directory Automatically Maintain
070902 -
070903 - The code that automatically extends the SDS 00 Schedule file developed
070904 - on 031217, ref SDS 3 0001, and, also, the op that recycles filenames,
070905 - developed on 031125, ref SDS 2 AS5L, both together increase the need
070906 - to maintain the 00 directory so that filenames are not left lying
070907 - around from transferring operations between computers.
070909 -  ..
070910 - This condition from automating other tasks that reduce the burden on
070911 - the User to remember to perform routine maintenance on the system, now
070912 - brings attention to automate maintenance.
070914 -  ..
070915 - Orgininally, the maintenance function was intended to give the user
070916 - the opportunity to make a judgement about whether to delete files that
070917 - are in the current Schedule 00 directory, but are not listed in the
070918 - Schedule, i.e., there is a mismatch.  Earlier, this could occur from a
070919 - variety of odd events, e.g., the computer crashing due to memory
070920 - problems during program launch for example.  While this was rare, it
070921 - occurred most often when creating a diary record for a prior date,
070922 - which is done from the Schedule.  Recently, we have begun to migrate
070923 - the code toward creating prior date diary records from the Diary
070924 - rather than from the Schedule, and so reduces further the occassions
070925 - when the Schedule 00 directory gets out of sync with the list of tasks
070926 - in the Schedule.
070928 -  ..
070929 - One task where this occurs a lot now is from frequent transferring
070930 - operations between computers.  Gary does this everyday, at least back
070931 - when he was using SDS at Aerospace company.  If things break right
070932 - with the current Aerospace company initiative to procure an evalution
070933 - opportunity, discussed with Jackie on 040304, ref SDS 4 0001, then
070934 - Gary will resume transferring operations.  Lately, I have been
070935 - transferring between c12 and c13 to move from normal desktop work in
070936 - the computer room to a more relaxed situation in the bedroom, where I
070937 - watch television, if the mood strikes, and can continue working in the
070938 - easy chair until sleep overtakes the work.  This entails transferring
070939 - OA 1900 and then OA 0500, i.e., two per day.  The result using the
070940 - current design has been frequent situations when a new record is
070941 - opened, and there is already content from an 00 file that has been
070942 - archived on the other machine, but not deleted in the current machine.
070943 - This situation is confusing and takes a few mintues to create and
070944 - empty record in order to start fresh.
070946 -  ..
070947 - One solution could be to empty the content of 00 when a transfer is
070948 - received so that only the received content from the other machine is
070949 - available.  This seems risky for a variety of scenarios for which
070950 - there is not enough time to explain here.
070952 -  ..
070953 - A less risky method is to automate Schedule maintenance with program
070954 - launch once a day after the 00 directory is archived.  This will save
070955 - all of the files, and then shear off the ones that are not listed in
070956 - the Schedule.  In 20 years using SDS, I don't recall ever having to
070957 - restore a Schedule record in the 00 directory, but there is always a
070958 - first time, especially for new users, who can do some strange things
070959 - that might give rise to having to recover a deleted record in the 00
070960 - directory.
070961 -
070963 -  ..
0710 -
0711 -
0712 - Planning
0713 -
071301 - The code in 04702 will run the archive operation, and then run the
071302 - maintenance macro, 0502, ref OF 3 7730, per below, ref SDS 0 SC51, and
071303 - 04702 will then execute the F1 function, ref OF 3 5J4O, in 0502 that
071304 - deletes mismatches. ref OF 3 KK9L
071306 -  ..
071307 - The last time work was performed on 0502 was on 030414 when Gary
071308 - reported a problem. ref SDS 1 0001
071310 -  ..
071311 - At that time developed a new feature to restore a record. ref SDS 1
071312 - WU5L
071314 -  ..
071315 - Automating the maintenance feature, will eliminate the need for this
071316 - function, but will keep the code around for awhile in case something
071317 - develops where something like this can be helpful.
071318 -
071319 -
071321 -  ..
0714 -
0715 -
0716 - Progress
0717 -
071701 -
071702 -
071703 - Line 1110, ref OF 2 QT5M, -label Exectv in 04702 about 50 lines below
071704 -
071705 -    -label Exectv
071706 -
071707 -        This code opens the Schedule
071708 -
071710 -  ..
071711 - Line 1160, ref OF 2 P47F, -label Exectv in 04702 about 100 lines below
071712 -
071713 -        New user set up begins here, when there is no Schedule for the
071714 -        user name.
071715 -
071717 -  ..
071718 - Line 1250, ref OF 2 D15O, -label bRno_curr in 04702
071719 -
071720 -    -label bRno_curr
071721 -
071722 -        Look for current date in the Schedule, and if not extend the
071723 -        Schedule for several months beyond the current date.
071724 -
071726 -  ..
071727 - Line 1350, ref OF 2 SR5F, -label dneS in 04702
071728 -
071729 -    -label dneS
071730 -
071731 -        User's name and ID set up on current date for opening records.
071732 -
071734 -  ..
071735 - Line 1400, ref OF 2 QJ4N, -label dneS in 04702 about 70 lines below
071736 -
071737 -    -label dneS
071738 -
071739 -        Move tasks not performed the day before to the current date,
071740 -        so they remain active.
071741 -
071743 -  ..
071744 - Line 1440, ref OF 2 PC8H, -label dneS in 04702 about 110 lines below
071745 -
071746 -    -label dneS
071747 -    @c:\sd\03\03101
071748 -
071749 -        Runs operation to archive 00 directory and backup all new or
071750 -        changed files from yesterday. ref OF 1 XB6F
071751 -
071752 -            [On 040315 removed call to backup1.bat that maintains
071753 -            transfer directory, and added a new call in 04072 that runs
071754 -            dos call to maintain transfer directory. ref SDS 6 3U7K
071755 -
071757 -     ..
071758 -    Select Filenames from Schedule 00 to Compare with Files on Disk
071759 -    Supersort Spec to Merge and Sort Dir List in 00 Dir with 00 File
071760 -
071761 -
071762 - Line 1490, ref OF 2 YH4G, -label dneS in 04702 about 160 lines below
071763 -
071764 -    setcnt 136 0
071765 -    e lst0
071766 -    macro 301
071767 -    immed a
071768 -    ins_text !m d:\sd\08\UUUUU\00\00;o lst2 k-output!
071769 -    loc_cur 4 1
071770 -    ins_text !se fi 1 1 bt "0","9" and fi 8 8 = " ";k 1 4;g!
071771 -    save
071772 -
071773 -        setcnt 136 0 starts counter to determine if there any records
071774 -        to delete. e lst0 opens temp file for Supersort command file to
071775 -        select the list of filenames in the Schedule 00 file to compare
071776 -        with the dir list on the disk that will be created next; macro
071777 -        301 empties content of temp file, if any, and adds a blank line
071778 -        with cursor on 3 1 ready for data entry.  immed a adds an extra
071779 -        line because the spec has two lines.  ins_text creates basic
071780 -        Supersort merge command; output filename is lst2, and is keys
071781 -        only so we get a list of just the filenames to compare the list
071782 -        in the 00 file with dir list on the disk.  loc_cur 4 1 moves
071783 -        cursor the the 2nd line in the file for ins_text command that
071784 -        complets spec for Supersort merge command.  save writes
071785 -        Supersort command file to the disk ready to be used later.
071786 -
071787 -            [On 040317 revised work today to create new method for code
071788 -            to maintain the Schedule 00 file with the 00 schedule
071789 -            directory. ref SDS 7 YJ7L
071790 -
071791 -
071792 -
071794 -     ..
071795 -    Composite Sorted List Compare 00 Filenames with Files on Disk
071796 -    Lst3 Composite File Listing 00 Filenames with List from 00 Dir
071797 -
071798 -
071799 - Line 1510, ref OF 2 QTYT, -label dneS in 04702 about 180 lines below
071800 -
071801 -    e c:\sd\03\04702
071802 -    purge lst0
071803 -    *%ds1
071804 -    dose /c dir d:\sd\08\UUUUU\00 > lst1
071805 -    *%
071806 -    *%
071807 -    dose /c s i 256 cr; cf lst0 >nul
071808 -    *%
071809 -    *%
071810 -    dose /c s i 256 cr; s lst1 lst2; o lst3;k 1 30;g >nul
071811 -
071812 -        Open 04702 (doesn't matter, could have returned to 00 Schedule
071813 -        with ecur 96.  purge lst0 removes Supersort command file from
071814 -        memory since it is now saved to the disk and ready.  dose /c
071815 -        dir... gets the list of files in the 00 directory for the
071816 -        Schedule and puts the list in lst1.  dose /c s i 256 cr...runs
071817 -        Supersort using command file lst0 just constructed, per above.
071818 -        ref SDS 0 EH43  dose /c s i 256 cr; runs Supersort again to
071819 -        sort the list in file lst1 taken from the 00 file, with the
071820 -        list in file lst2 created from the disk, and creates output
071821 -        file lst3 that will now be used to investigate if there are
071822 -        mismatches.
071823 -
071824 -
071826 -     ..
071827 -    Lst3 Open and Compare to Find and Eliminate Mismatches
071828 -
071829 -
071830 - Line 1510, ref OF 2 QTYT, -label dneS in 04702 about 180 lines below
071831 -
071832 -    e lst3
071833 -    top
071834 -    setcnt 86 1
071835 -    z 1 4
071836 -    errorcnt 0 0
071837 -    immed dd
071838 -    l /0001/
071839 -    down
071840 -    immed dd
071841 -
071842 -        e lst3 opens composite and sorte list, per above, ref SDS 0
071843 -        LS7J, setcnt 86 1 sets up to read the filename.  z 1 4 zones
071844 -        the filename; errorcnt 0 0 sets up to search for top of list of
071845 -        filenames to evaluate.  immed dd begins op to remove lines at
071846 -        top of file that are only diagnostics.  l /0001/ finds the 0001
071847 -        filename. down and immed dd completes deleting diagnostics, so
071848 -        only the filenames can be processed.
071849 -
071850 -            [On 040317 revised work today to create new method for code
071851 -            to maintain the Schedule 00 file with the 00 schedule
071852 -            directory. ref SDS 7 YJ7L
071853 -
071855 -     ..
071856 -    bot
071857 -    immed a
071858 -    top
071859 -
071860 -        Jump to bot and add a line to serve as a means to recognize
071861 -        when all of the lines have been processed.
071862 -
071863 -
071865 -  ..
071866 - Line 1510, ref OF 2 EI4P, -label dneS in 04702 about 180 lines below
071867 -
071868 -    -label lpwy5
071869 -    chrcnt 1 0
071870 -    -if @1 = 32 -goto end
071871 -    -if @1 < 65 -goto zon5
071873 -     ..
071874 -    immed 3d
071875 -    -goto end
071876 -
071877 -    -label zon5
071878 -    zonereps
071879 -    up
071880 -    repscnt 1 0
071881 -    -if @1 = 0 -goto delx
071882 -
071884 -          ..
071885 -         Delete entries that are in the 00 file, but save the ones in
071886 -         the dir list, because that means there are unaccounted for
071887 -         files.
071889 -     ..
071890 -    down
071891 -
071892 -     -label len
071893 -    setlen 5 0
071894 -    -if @5 < 8 immed d
071895 -      -if @0 > 0 -return
071896 -
071897 -         Do we have a file on the disk that is not defined on the 00 file?
071898 -
071899 -    -if @5 > 8 -goto d_disk
071900 -
071901 -    -goto lpwy5
071903 -                      ..
071904 -                     Remove entries that match the dir and 00 file.
071905 -
071906 -    -label delx
071907 -    down
071908 -    immed 2d
071909 -    -goto lpwy5
071910 -
071911 -
071912 -    -label d_disk
071913 -    addcnt 120 1
071914 -    setgbl 120 @120
071915 -                    Read filename.
071916 -    macro 1182
071917 -    loc_cur 0 1
071918 -                    Open temp processor
071919 -
071920 -    -if @120 = 1 -gosub setup
071921 -    e 0w6j
071922 -    getgbl 120 120
071923 -    -if @120 > 1 immed r
071924 -    -if @120 > 1 up
071925 -                      Enter file spec
071926 -    macro 1181
071927 -    loc_cur 0 23
071928 -                      Return to list and delete entry.
071929 -    e lst3
071930 -    immed d
071931 -    -goto lpwy5
071932 -
071933 -
071934 -
071935 -
071936 -
0720 -