Welch Company
San Francisco, CA


S U M M A R Y


DIARY: November 27, 2002 11:47 AM Wednesday; Rod Welch

Modify SDS archive op to preserve current day records.

1...Summary/Objective
2...Backup 00 Directory Makes Recovery From Launch Crash Fast and Easy
3...SDS Launch Fails to Archive Diary Records
4...Backup Incorporated into SDS Launch and Archive Operation
5...04702 SDS Launch Op Modify to Backup Work Files and Archive 00
6...031010 Configure Backup.bat Use Copy to Save 00 Directory
7...03101 Netscape Setup to Save Configuration and History
8...03101 Backup.bat Execute Zip, Copy, Other Ops to Maintain Work Files
9...Backup.bat Configure to Backup SDS and Work Files, Maintain Other
10...Netscape Configuration and History Maintained with Backup
11...Backup.bat Netscape Configuration and History Maintained


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

CONTACTS 

SUBJECTS
04702 Archive Records Global Pointers Schedule Set Up
Backup Working Files Running 02901.Bat
Backup Interim Run from the File Menu in Schedule, SDS Records or Edi
Launch 04702 Failed to Archive Records
04702 Archive Records Global Pointers Schedule Set Up

0607 -
0607 -    ..
0608 - Summary/Objective
0609 -
060901 - Follow up ref SDS 5 YD5L, ref SDS 2 0000.
060902 -
060903 - SDS program launch running 04702 failed this morning, ref SDS 0 M65O,
060904 - The problem was similar, yet different from anything that has occurred
060905 - previously. ref SDS 0 M73W  Like prior similar problems, there was no
060906 - evident problem with the code, so at this time failure is attributed
060907 - to SDS memory limitations. ref SDS 0 X74J  To aid recovery, developed
060908 - improvement for the system backup feature to archive the entire SDS
060909 - schedule 00 directory, so it can be quickly restored to run program
060910 - launch after closing programs and running the operation again.  Added
060911 - a call into SDS launch 04702 op that will now run backup automtically,
060912 - and this will save the current set of 00 prior to any archiving, so if
060913 - another problem occurs, the saved 00 set, need merely be copied to the
060914 - actual 00 location to run progam launch again.  Added similar backup
060915 - for Internet access and email under a notion of Customize which will
060916 - preserve configuration for my user ID under Netscape, and will empty
060917 - the cache and history files. ref SDS 0 OO4H and ref SDS 0 RU6L
060918 - Configuring system backup and recovery for automatic processing should
060919 - be a stronger solution. The code also permits running the backup op
060920 - separately from program launch at will from either the Editor or SDS.
060921 -
060922 -      [On 030601 improved 03101 to accomodate different operating
060923 -      systems for w98 and w2k. ref SDS 8 8Q4I
060924 -
060925 -
060926 -
060928 -  ..
0610 -
0611 -
0612 - Evaluation
0613 -
061301 - Backup 00 Directory Makes Recovery From Launch Crash Fast and Easy
061302 -
061303 - The design that saves the current SDS schedule files in the 00
061304 - directory for each user in a unique directory based on time seems like
061305 - a useful complement to backup support for SDS.
061306 -
061307 - This makes the process faster and easier to recover from inexplicable
061308 - failure of SDS program launch and archive operations, as occurred
061309 - today, and in previous weeks and months. ref SDS 0 M65O
061311 -  ..
061312 - The improvement of the code to save the entire current directory is
061313 - fast and easy, so there is no loss of time, and the size of this
061314 - additional data is not significant, so there is essentially no impact
061315 - on system resources in the sense of inadvertantly running us out of
061316 - disk storage.  Since these backups only have utility for a short
061317 - period, they can be removed from the disk once a month, since the
061318 - monthly backup enables access, if they should be needed later. Saving
061319 - the 00 directory itself only has utility for at most a few days,
061320 - because if a problem occurs that these files can fix, it is readily
061321 - apparent as occurred today. ref SDS 0 M65O  Therefore, saving a month
061322 - of these 00 directory files is more than adequte.
061324 -  ..
061325 - Calling the revised 03101 routine in the 04702 program launch op, per
061326 - below, ref SDS 0 KEYW, is helpful in a number of ways...
061327 -
061328 -     1.  Improves backup by having it done regularly once or even
061329 -         several times a day during program launch when SDS records are
061330 -         added for a prior date, ensures that backup will get done and
061331 -         provides some support for version control.
061333 -          ..
061334 -     2.  Allows calling backup from the Editor by posting the User ID
061335 -         in the backup.bat file, which otherwise does not have a way
061336 -         enter this control criteria for identifying where to put the
061337 -         00 directory.
061339 -  ..
061340 - Retaining the prior functionality and flexibility to run the backup
061341 - quickly and easily at will, in addition to running it automatically
061342 - seems like a stronger solution.
061343 -
061344 -
061345 -
061347 -  ..
0614 -
0615 -
0616 - Problem
0617 -
061701 - SDS Launch Fails to Archive Diary Records
061702 -
061703 - Last just after midnight, I closed SDS and stated it to archive
061704 - yesterday's work, and start fresh today.
061705 -
061706 - I did not do anything at that time, just went to bed.
061708 -  ..
061709 - I thought that I ran the backup op before closing SDS and starting it
061710 - up to archive the record for yesterday.
061712 -  ..
061713 - This morning I received a letter from Gary on something related to
061714 - work yesterday.  I opened the diary and clicked on a record for
061715 - yesterday and got an error message that the record was there.
061717 -  ..
061718 - I then tried opened the other records for yesterday and got the same
061719 - error message.
061721 -  ..
061722 - This is a new problem.
061724 -  ..
061725 - We have previously had two problems that occur once in awhile...
061726 -
061727 -    1.  The archive operation that assembles the pointers into a
061728 -        global pointer file simply stops about 75% through.  All of
061729 -        the processing seems to occur correctly for SDS, but the copy
061730 -        and sort op to assemble global pointers is not completed.
061732 -         ..
061733 -        The solution on these occassions is to manually close the op by
061734 -        pressing Home to put the cursor on the command line, and enter
061735 -        q for quit and hit Home to execute the command.
061737 -         ..
061738 -        When SDS is opened, we can call the archive update op in the
061739 -        Schedule Diary menu, and this runs the code that updates the
061740 -        global pointers.
061742 -         ..
061743 -    2.  The archive appears to run correctly because it does not crash
061744 -        however, when a diary is opened one or more task descriptions
061745 -        is missing for the work from the priod day.
061747 -         ..
061748 -        This means that for some reason the 04 pointers were not
061749 -        archived correctly.
061751 -         ..
061752 -        The solution is to open an SDS diary record, use F1 F3 to get
061753 -        a list of SDS files for yesterday...
061754 -
061755 -                   d: sd 08 uuuuu 02 yy mm dd
061757 -         ..
061758 -        ...and this shows the records were actually archived, even
061759 -        though the 04 record description pointers were not saved.
061761 -         ..
061762 -        Use the command line to set the SDS profile 47 2, then use F1
061763 -        to scroll through the profile to get the file recognized as an
061764 -        SDS record and not just a file.
061766 -         ..
061767 -        Before using F2, we need to set another flag to distinguish
061768 -        between a Schedule record and a Diary record.  This is easy to
061769 -        do but difficult to remember when counter to set to what.  I
061770 -        could get a list of current counters for the SDS record, and
061771 -        see that 271 needs to be 1000 and 272 needs to be 1002, and so
061772 -        set these values in the record being repaired, but don't always
061773 -        remember to do this.  It is easy to link the target record to
061774 -        the record used to open it, and then open the link, because SDS
061775 -        sets the ID counters automatically when it opens a linked
061776 -        record.
061778 -         ..
061779 -        Once the flags are set F2 saves the pointers, and then the
061780 -        description shows in a diary summry.
061782 -  ..
061783 - The problem today is different because it reverses the normal
061784 - situation where the records are archived, but the description does
061785 - not show up in the Diary Summary.
061787 -  ..
061788 - Examination showed that the code today updated the Schedule, archived
061789 - the pointers, but did not save the SDS records under the SDS directory
061790 - structory for archived diary records.
061792 -  ..
061793 - Fortunately, the files for the records that were not archived were
061794 - still in the current 00 directory.  This made it possible to
061795 - configure the 00 Schedule file back to the condition for yesterday.
061797 -  ..
061798 - After that was done, I saved the entire directory to another location,
061799 - then launched SDS.
061801 -  ..
061802 - The program ran for the usual period required to archive, assemble and
061803 - sort the global pointers, and came up configured for today's date, as
061804 - it should.
061806 -  ..
061807 - I opened the Diary and the same tasks shown earlier were listed again.
061808 - Clicking on each task showed it was correctly archived.
061810 -  ..
061811 - This experience of correct performance with no evident change in the
061812 - files nor the SDS code, indicates the problem that occurred last night
061813 - may have been memory related.  It could be just a quirky event that is
061814 - similar to the other examples cited above, ref SDS 0 OV6O, which both
061815 - seem to run once memory is cleared.
061816 -
061817 -
061818 -
061820 -  ..
0619 -
0620 -
0621 - Planning
0622 -
062201 - Backup Incorporated into SDS Launch and Archive Operation
062202 -
062203 - The main thing to accomplish is preserving the initial condition in
062204 - advance of updating the Schedule.
062205 -
062206 - We can run a backup automatically using the 03101 code that was
062207 - created on 021012. ref SDS 2 FE3K
062209 -  ..
062210 - We can let 04702 run 03101 which calls backup.bat.
062212 -  ..
062213 - We can modify backup.bat to copy the 00 directory into the backup
062214 - directory. ref SDS 0 FY5F
062216 -  ..
062217 - This sounds similar to work on 981208 that added a call to 25.bat to
062218 - update global pointers, ref SDS 1 0001, except this will occur before
062219 - any processing occurs on SDS records.
062220 -
062221 -
062222 -
062223 -
062224 -
062225 -
062226 -
0623 -

SUBJECTS
04702 Archive Records Global Pointers Schedule Set Up
03101 Backup 00 Direcotry for Current User Working Files Running Back

0804 -
080501 -  ..
080502 - 04702  SDS Launch Op Modify to Backup Work Files and Archive 00
080503 -
080504 - Follow up ref SDS 2 0001, ref SDS 4 H2UV.
080505 -
080506 - Line 1070, ref OF 2 FJ8M, -label Exectv in 04702
080507 -
080508 -    This is where the code closes the Group Manager and opens the
080509 -    Schedule.
080511 -  ..
080512 - Line 1370, ref OF 2 PC8H, -label bRFnD in 04702 about 100 lines below
080513 -
080514 -    -if @120 = 1 -if @61 != 1333 -goto bRstop_w
080515 -
080516 -       If this conditional is executed the current date is at the top
080517 -       of the file, so there is no need to archive the records.
080519 -        ..
080520 -       Therefore, when the code passes this date, it means an archive
080521 -       op will run.
080523 -     ..
080524 -    @c:\sd\03\03101
080525 -
080526 -       03101 opens backup.bat to set directories based on date and
080527 -       time, and will post user ID to copy current 00 dir for a backup
080528 -       directory, per below. ref SDS 0 FE3K
080529 -
080530 -
080531 -
080532 -
080533 -
080534 -
080535 -
0806 -

SUBJECTS
00 Current Directory Save Daily Interim Backup Called with 04702 Lau

1303 -
130401 -  ..
130402 - 031010   Configure Backup.bat Use Copy to Save 00 Directory
130403 -
130404 - Follow up ref SDS 2 FE3K.
130405 -
130406 - Per planning above, we need to backup 00 dir every day to avoid
130407 - inadvertant problems. ref SDS 0 M74A
130408 -
130409 -            [On 070617 0555 moved code to 04702 SDS launch op,
130410 -            ref SDS 9 R58J; and switched from pkzip to xcopy in
130411 -            backupi.cmd. ref SDS 9 EX5H
130413 -  ..
130414 - Line 90, ref OF 1 OV9N, in 03101
130415 -
130416 -    This is where c: sd 01 backup.bat is opened by the existing code.
130418 -  ..
130419 - Line 110, ref OF 1 D16H, in 03101
130420 -
130421 -    z 1 20
130422 -    l /xcopy target/
130423 -
130424 -       Move to the line where the xcopy command is specified.
130426 -        ..
130427 -       We tried to use copy, but only xcopy will copy hidden files,
130428 -       which is needed for confidentiality.
130430 -     ..
130431 -    loc_cur 5 38
130432 -
130433 -       Put the cursor on the user ID field.
130435 -  ..
130436 - Line 130, ref OF 1 BS4J, in 03101
130437 -
130438 -    macro 911
130439 -
130440 -       Move user ID globals to locals.  This will provide a flag
130441 -       showing a User ID is available when this is run from SDS.
130443 -     ..
130444 -    -if @285 > 47 -if @285 < 91 macro 841
130445 -
130446 -       If there is a User ID enter it in the xcopy command, and if not
130447 -       don't enter anything so that the last entry will be used in the
130448 -       xcopy command spec that copies the 00 directory to the current
130449 -       backup directory, which will be set by 03101 in the next step
130451 -        ..
130452 -       In order to run this from the Editor we need a way to get a user
130453 -       ID even though the user ID is not available in the Editor.
130455 -        ..
130456 -       This design will say that if there is no user ID, then use the
130457 -       user ID for the last run.  This should be fairly servicable
130458 -       because, since the op will be run at least once a day from
130459 -       04702, per above, ref SDS 0 KEYW, there will always be a user ID
130460 -       to draw on.
130462 -  ..
130463 - Line 240, ref OF 1 154N, -label end in 03101
130465 -  ..
130466 - Append the same time string to 0hhmmss to create directory each pass.
130467 -
130468 -    top
130469 -    z 1 4
130470 -    l /md 0/
130471 -
130472 -       Find make dir command in batch file, per below. ref SDS 0 FY5F
130474 -     ..
130475 -    loc_cur 3 5
130476 -    -gosub time
130477 -
130478 -       Put cursor on time portion of directory name and enter time
130479 -       using standard code that creates all of the backup filenames.
130481 -     ..
130482 -    z 1 20
130483 -    l /xcopy target/
130484 -    loc_cur 3 48
130485 -    -gosub time
130486 -
130487 -       We tried to use copy in sd 01 backup.bat, but only xcopy will
130488 -       copy hidden files, which is needed for confidentiality, per
130489 -       below. ref SDS 0 4N34
130490 -
130491 -            [On 070617 0555 moved code to 04702 SDS launch op,
130492 -            ref SDS 9 R58J; and switched from pkzip to xcopy in
130493 -            backupi.cmd. ref SDS 9 EX5H
130495 -        ..
130496 -       Xcopy command is only a few lines below, but use locate command,
130497 -       in case it is moved later.  Since xcopy does not seem to work in
130498 -       a batch file called under cmd start, include path with the
130499 -       variable systemroot, per below. ref SDS 0 TZ8J
130501 -        ..
130502 -       Move cursor to the time portion of dir string and enter time to
130503 -       uniquely identify a directory for holding the 00 files, per
130504 -       below. ref SDS 0 IG6I
130505 -
130506 -
130507 -
130508 -
1306 -

SUBJECTS
Backup Configuration
Netscape Configuration Preferences Bookmarks Email

1504 -
150501 -  ..
150502 - 03101  Netscape Setup to Save Configuration and History
150503 -
150504 - Line 250, ref OF 1 4L7H, -label end in 03101 about 30 lines below
150505 -
150506 -    z 5 14
150507 -    l /Customize/
150508 -
150509 -       zone in file backup.bat to look for Customize to save Netscape
150510 -       configuration and delete the files that grow to infinity.
150511 -       ref SDS 0 RU6L
150513 -     ..
150514 -    z 1 3
150515 -    l /md /
150516 -
150517 -       Jump to line to make a new dirctory.
150519 -     ..
150520 -    loc_cur 3 32
150521 -    -if @13 < 10 ic 48
150522 -    inscnt 13 0
150523 -
150524 -       Put the cursor on the position in the string....
150525 -
150526 -       md h:\00\07\users\00101\config\ddhhmmss
150527 -
150528 -       ...to enter a new directory for ddhhmmss.  We had to change the
150529 -       location from loc_cur 3 35 to loc_cur 3 32 because for some
150530 -       reason DOS was not creating the subdirectory in the directory
150531 -       "configure" so changed to "config," per below. ref SDS 0 RU6L
150533 -        ..
150534 -       If the day param is less than 10, pad the position with "0",
150535 -       and then enter the day of the month.
150537 -     ..
150538 -    -gosub time
150539 -
150540 -       Call subroutine that enters current time, from initial datecnt
150541 -       command set at the beginnng of 03101, as explained in the record
150542 -       on 021012 when 03101 was initially developed. ref SDS 2 G35M
150543 -
150545 -  ..
150546 - Line 250, ref OF 1 RP6I, -label end in 03101 about 30 lines below
150547 -
150548 -    z 1 5
150549 -    l /copy/
150550 -    loc_cur 5 55
150551 -
150552 -       After setting up md command, move copy command to current line
150553 -       and put the cursor on the column to enter ddhhmmss as the target
150554 -       directory identified in the prior step as the target for the
150555 -       copy command.  Per above, we had to change the location for this
150556 -       because for some reason DOS was not creating the subdirectory in
150557 -       the directory "configure" so changed to config. ref SDS 0 OYYR
150559 -        ..
150560 -       Note, we can use copy command here to accomplish the objective
150561 -       because we are not copying hidden files, which is needed for
150562 -       copying the current SDS 00 directory, per above. ref SDS 0 154N
150564 -     ..
150565 -    -if @13 < 10 ic 48
150566 -    inscnt 13 0
150567 -    -gosub time
150569 -        ..
150570 -       Enter the day of the month, so this will recycle every 30
150571 -       days, and then enter the time, so this save will be unique each
150572 -       pass during a day.
150573 -
150575 -  ..
150576 - Complete code as originally configured on 021012. ref SDS 2 YP6O
150577 -
150579 -  ..
150580 - 03101  Backup.bat Execute Zip, Copy, Other Ops to Maintain Work Files
150581 -
150582 - Line 250, ref OF 1 5V6I, -label end in 03101 about 30 lines below
150583 -
150584 -    dose /c cmd /C start /shared /wait /realtime /b c:\sd\01\backup
150585 -
150586 -       Trying "cmd" and "start" commands, per planning on 021016.
150587 -       ref SDS 3 U1PT
150589 -        ..
150590 -       We are getting an error message durng run time of backup.bat,
150591 -       ref SDS 0 4N34, under this command string that says "xcopy" is
150592 -       not a recognized command. ref SDS 0 4N34
150594 -  ..
150595 - Trying...
150596 -
150597 -    dose /c cmd /C start /i: c:\sd\01\backup
150598 -
150599 - ...and below, tried adding path to xcopy command. ref SDS 0 TZ8J
150601 -  ..
150602 - This sort of worked, but processing in Medit gets hung up.  If the
150603 - code is run with debug 100 then it works.  Tried some combinations
150604 - using debug 1 and debug 99, to trick the thing into continuing on its
150605 - own, but could not get a successful run.
150607 -  ..
150608 - Tried quite a few combinations of start parms, but could not get the
150609 - code to run.  It hangs up after completing the op, and we it to
150610 - restore control to the original code.  In some cases, if we hold a key
150611 - pressed, the cursor will scroll acroll the screen and color in the SDS
150612 - Schedule, showing that the Medit code ran, but cannot get this to
150613 - return to DOS.
150615 -            ..
150616 -           [On 030106 made progress applying cmd and start commands to
150617 -           save memory. ref SDS 6 714L
150619 -            ..
150620 -           [On 030109 planning to apply cmd and start. ref SDS 7 0001
150621 -
150622 -
150623 -
150624 -
150625 -
150626 -
150627 -
1507 -

SUBJECTS
Batch File SD 01 Backup.bat Calls Pkzip and Managed by Macro 03101

1603 -
160401 -  ..
160402 - Backup.bat   Configure to Backup SDS and Work Files, Maintain Other
160403 -
160404 - Line 50, ref OF 4 FF6G, in c: sd 01 backup.bat
160405 -
160406 -    md 0hhmmss
160407 -
160408 -       Added command to create a separate directory each time the thing
160409 -       runs.  The hhmmss param is entered by 03101, per above.
160410 -       ref SDS 0 T46G
160412 -       ..
160413 -      copy d:\sd\08\uuuuu\00 0hhmmss
160414 -
160415 -       Added new command to copy the contents of the 00 directory to a
160416 -       directory in the backup directory.
160417 -
160418 -       Note, we initially tried xcopy.  It ran fine during trials from
160419 -       a DOS prompt, but returned an error message when run from within
160420 -       the DOSE /C op called from within 03101, so had to switch to
160421 -       having a separate command to create the directory and then use
160422 -       the copy command to transfer the files.
160424 -        ..
160425 -       Copy presents a problem.  It does not seem to copy hidden files,
160426 -       which occur for confidential records.  We do not have a
160427 -       convenient way to handle these files individually, until later
160428 -       in the code after this operation has run.
160430 -     ..
160431 -    xcopy d:\sd\08\uuuuu\00 0hhmmss /h
160432 -
160433 -       Xcopy param for user ID is entered by 03101, per above,
160434 -       ref SDS 0 R37H, and the directory, also, per above. ref SDS 0
160435 -       154N  Hopefully, /h param will copy hidden files, so we save all
160436 -       files in the current 00 directory, in case they are needed
160437 -       later to recover or do testing, etc.
160439 -        ..
160440 -       We are getting an error message durng run time under the command
160441 -       string above, ref SDS 0 JU6G, that says....
160442 -
160443 -           'xcopy' is not recognized as an internal or external
160444 -           command, operable program or batch file.
160445 -
160446 -           This is occurring because the path is changed to c: sd 01,
160447 -           ref OF 4 KB7H, and xcopy is not a system command like dir.
160448 -
160450 -  ..
160451 - Trying...
160452 -
160453 -    i:\00\02\system32\xcopy d:\sd\08\uuuuu\00 0hhmmss /h
160454 -
160455 -       This seemed to work.
160457 -  ..
160458 - Tried....
160459 -
160460 -    %systemroot%\system32\xcopy d:\sd\08\uuuuu\00 0hhmmss /h
160461 -
160462 -       This generalizes the command so it is not tied to one
160463 -       configuration for the operating system directory.
160464 -
160466 -  ..
160467 - Netscape Configuration and History Maintained with Backup
160468 - Backup.bat  Netscape Configuration and History Maintained
160469 -
160470 - Line 160, ref OF 4 018P, in backup.bat
160471 -
160472 -    md h:\00\07\users\00101\config\30074734
160473 -
160474 -       Make a new directory based on day and time, so we are always
160475 -       saving at most 31 of these files, since that is all that we
160476 -       need.  We also backup the whole thing up once a month, so this
160477 -       is further backup. This command is set up each pass by 03101,
160478 -       per above. ref SDS 0 OO4H
160480 -     ..
160481 -    copy h:\00\07\users\00101 h:\00\07\users\00101\config\ddhhmmss
160482 -
160483 -       Copy all of the files that configure Netscape for the User 00101
160484 -       into a "configure" backup directory, based on the date and time.
160485 -       This command is set up each pass by 03101, per above.
160486 -       ref SDS 0 OO4H
160488 -        ..
160489 -       This will make restoring configuration fast and easy when this
160490 -       gets lost somehow, someway.
160492 -     ..
160493 -    rd /s /q h:\00\07\users\00101\cache
160494 -    del h:\00\07\users\00101\netscape.hst
160495 -
160496 -       Empty cache once a day and delete history once a day.
160497 -
160498 -
160499 -
160500 -
160501 -
160502 -
160503 -
160504 -
160505 -
160506 -
160507 -
160508 -
160509 -
160510 -
160511 -
160512 -
1606 -