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: February 20, 2006 02:41 PM Monday; Rod Welch

Gary solved problem launching SDS and constructing global pointers.

1...Summary/Objective
2...Global Pointers Consolidate Code Gary Submits Better Solution


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

CONTACTS 

SUBJECTS
Global Pointer Construction Problem Solved Gary Installed DOS Substi

1703 -
1703 -    ..
1704 - Summary/Objective
1705 -
170501 - Follow up ref SDS 13 0000. ref SDS 11 0000.
170502 -
170503 - Gary found that a change to the DOS environent on his office computer
170504 - caused problems running DOS commands called within SDS.  He has this
170505 - fixed now. ref SDS 0 6L5I  He developed a suggestion that reduces the
170506 - amount of code for assembling global pointers. ref SDS 0 BK6P  This
170507 - was implemented. ref SDS 0 L291  For some reason, despite evident few
170508 - steps, the new method takes about 50% longer. ref SDS 0 GS6H  Sent a
170509 - letter asking Gary to check for an error in the code that may be
170510 - causing this counterintuitive result. ref SDS 0 1N6K
170511 -
170512 -
170513 -
170514 -
170515 -
170516 -
170517 -
170518 -
170520 -  ..
1706 -
1707 -
1708 - Progress
1709 -
170901 - Gary discovered the problem he reported on 060215, ref SDS 13 6L5I,
170902 - was caused by installing the day before on 060214 a new version of a
170903 - DOS substitute program.  This program is installed on his home
170904 - computer, and did not cause a problem.  On his office computer, the
170905 - installation process for the DOS substitute program caused the Windows
170906 - registry to do something like setting compsec to the alternate DOS
170907 - program rather than command.com.  As a result, DOS batch files called
170908 - under SDS do not run in the manner that command.com executes commands.
170910 -  ..
170911 - After he changed the Windows registry to call command.com, the problem
170912 - on 060215. ref SDS 13 IS73
170914 -  ..
170915 - Received ref DRT 1 0001 from Gary saying...
170916 -
170917 -    1.  = Global Pointer Creation hangs
170919 -         ..
170920 -    2.  The problem was caused by the update to JPSoft's 4NT command
170921 -        shell.  The initial installation asked about making it the
170922 -        default command shell, the update just did it. ref DRT 1 KO5K
170924 -         ..
170925 -    3.  Correcting the Windows Registry for 'batfile' and 'cmdfile'
170926 -        open commands to point to cmd.exe and rebooting allowed SDS to
170927 -        update the database using the Diary menu entry. ref DRT 1 UO6F
170929 -  ..
170930 - This solution reflects Gary's effort to use 4DOS, reported on 021029.
170931 - ref SDS 3 0001  Same problem occurred again on 040913, and was solved
170932 - by switching back to Microsoft DOS. ref SDS 7 4Q5Y
170934 -  ..
170935 - Gary's letter continues...
170936 -
170937 -    4.  I need to check this on XP at home, since I would think that
170938 -        the installation of the 4NT upgrade would make the same change
170939 -        there. ref DRT 1 6P6K
170941 -         ..
170942 -    5.  I plugged 25.bat back in at line 2800 of c:\01\04\047020 and
170943 -        recompiled it.  Since it works from the menu it should work
170944 -        here as well. ref DRT 1 AP6O
170945 -
170946 -
170947 -
170948 -
1710 -

SUBJECTS
Global Pointers Consolidate Code Gary Submits Solution Reduces Steps
Global Pointer Construction Problem Solved Gary Installed DOS Substi

2104 -
210501 -  ..
210502 - Global Pointers Consolidate Code Gary Submits Better Solution
210503 -
210504 - Gary's letter continues...
210505 -
210506 -    6.  = Append rather than copy. ref DRT 1 5M6O
210508 -         ..
210509 -        At line 88 in c:\01\04\0010 is this
210510 -
210511 -           dose/c copy d:\sd\08\UUUUU\01\yy\* /a \kq\UUUUUyy > nul
210513 -         ..
210514 -    7.  This copies one year of global pointer files to a single file
210515 -        for the user. ref DRT 1 8I8F
210517 -         ..
210518 -    8.  Later, in 25a.cmd, these are concatenated to yield c:\kq\docs0.
210520 -         ..
210521 -    9.  Macro 0011 does a similar thing and builds docs2, ref DRT 1
210522 -        HI8K
210524 -         ..
210525 -   10.  The following should work, and appears to do so in batch file
210526 -        tests:
210527 -
210528 -           dose/c copy  /a \kq\docs0+d:\sd\08\UUUUU\01\yy\* \kq\docs0 > nul
210529 -
210530 -              [...see below implemented this change. ref SDS 0 L291
210532 -         ..
210533 -   11.  This requires fixing the code that replaces the second
210534 -        reference to user in the original, saving an empty \kq\docs0
210535 -        (or docs2), and removing the concatenating copy in 25a.cmd.
210536 -        ref DRT 1 JI9H
210538 -         ..
210539 -   12.  This should result in copying only half as much data.
210540 -        ref DRT 1 SI9M
210541 -
210543 -  ..
2106 -
2107 -
2108 - 1513
2109 -
210901 - Called Gary.
210902 -
210903 - He assisted in modifying the code to implement ideas in his letter to
210904 - modify 001, 0011, and 25a.cmd.
210906 -  ..
210907 - On 021012 modified 25a.bat, and macro files 001 and 0011. ref SDS 1
210908 - SN5X
210910 -  ..
210911 - Macro file 001 is called by 25a.cmd. ref OF 11 547G  It determines the
210912 - user IDs, and then assembles pointers for each type of search criteria
210913 - for each user.  These separate files for each user, and then copied
210914 - them into a single file for each type of search criteria.
210916 -  ..
210917 - Line 40, ref OF 11 547G in 25a.cmd
210918 -
210919 -    md \kq
210920 -    dir d:\sd\08 > dirx
210921 -    c:\sd\01\e dirx c:\sd\03\001
210922 -
210923 -        create temp directory; get a list of SDS users on the current
210924 -        computer, and assemble the list file dirx.  Open the dirx file
210925 -        and process the list of users with macro file 001....
210926 -
210928 -  ..
210929 - Line, ref OF 1 AU8J -label lpa in 001 about 30 lines below
210930 -
210931 -    -label lpa
210932 -    up
210933 -    -if @0 > 0 -goto lpaS
210934 -    chrcnt 1 0
210935 -    -if @1 = 32 -goto lpaS
210936 -    macro 1182
210937 -    e c:\sd\03\001
210938 -    line.................................... ref SDS 0 L26P
210939 -    loc_cur 4 21
210940 -    setcnt 86 1
210941 -    macro 1181
210942 -
210943 -        Load user ID into a dose command that gets the list of years
210944 -        to assemble for each user.
210945 -
210946 -
210948 -  ..
210949 - Line 90, ref OF 1 6C9G,
210950 -
210951 -    line                                                       && *%3
210952 -    loc_cur 4 36
210953 -    macro 1181
210954 -    *%7
210955 -    dose/c dir d:\sd\08\UUUUU\01 > dirxx
210956 -
210957 -        This loads User ID into the next step of assembling pointer
210958 -        files, dose command gets the list of year directories for each
210959 -        user and saves to file dirxx.
210960 -
210962 -  ..
210963 - Line 110, ref OF 1 E76G, -label lpbz in 001
210964 -
210965 -    e dirxx
210966 -    -gosub setup
210967 -    -if @0 > 0 -goto lpaSs
210968 -    -label lpbz
210969 -    up
210970 -    chrcnt 1 0
210971 -    -if @1 = 32 -goto lpaSs
210972 -    macro 1182
210973 -
210974 -        Open dirxx and read the year param for the list of pointers
210975 -
210977 -  ..
210978 - Line 130, ref OF 1 E76G, -label lpbz in 001
210979 -
210980 -    e c:\sd\03\001
210981 -    loc_cur 4 45
210982 -    macro 1181
210983 -    *%3
210984 -       dose/c copy d:\sd\08\UUUUU\01\yy\* /a \kq\UUUUUyy > nul
210985 -    dose/c copy  /a \kq\docs0+d:\sd\08\UUUUU\01\yy\* \kq\docs0 > nul
210986 -
210987 -        Open 001 processor and load the year value.  Gary proposed
210988 -        changing the code to reduce the number of steps, per his letter
210989 -        above. ref SDS 0 BK7W
210990 -
210992 -  ..
210993 - Similar change was made to 0011. ref OF 2 EE6I
210994 -
210996 -  ..
210997 - The difficult part of this was modifying 25a.cmd.
210999 -  ..
211000 - Line 30, ref OF 11 KF9J
211001 -
211002 -    copy \kq\* /a docs0 > nul
211003 -
211004 -        This step was eliminated.
211005 -
211006 -
211008 -  ..
2111 -
2112 -
2113 - 2133
2114 -
211401 - Testing.
211402 -
211403 - After getting these changes implemented, ran a test.
211404 -
211405 -    1st pass on c15 took about 42 seconds.
211406 -    2nd pass on c15 took about 34 seconds.
211408 -  ..
211409 - Switched the code back to original...
211410 -
211411 -    1st pass on c15 took about 23 seconds.
211412 -    2nd pass on c15 took about 19 seconds.
211414 -  ..
211415 - Did several more tests, and they all take 23 seconds on c15, which
211416 - has a 1.9 GHz centrino processor, which is quite a bit slower than
211417 - c14, but testing on the same machine compares apples with apples.
211419 -  ..
211420 - Not sure why removing steps should take 50% more time.  This is a
211421 - little surprising, because the new code Gary developed reduces the
211422 - overall number of steps.  Possibly append process is less efficient.
211423 - Just not clear on this.  Maybe there is something wrong with amended
211424 - batch file.  Have we retained an unnecessary step?
211426 -  ..
211427 - Went ahead and switched the originals back, and saved the new revised
211428 - files in....
211429 -
211430 -        e:\01\04\0010
211431 -        e:\01\04\00110
211432 -        e:\SD\01\25A.CMD
211433 -        e:\SD\03\001
211434 -        e:\SD\03\0011
211436 -  ..
211437 - These can be tested and perhaps revised further to increase
211438 - performance.
211439 -
211441 -  ..
211442 - Submitted an email connected to this record for comment.
211443 -
211444 -
211445 -
211446 -
211447 -
211448 -
211449 -
211450 -
2115 -