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: September 4, 2005 03:53 PM Sunday; Rod Welch

SDS improve create record for prior date.

1...Summary/Objective
2...Diary Prior Date Time Effort Reduced 90%
3...Diary for Prior Date Has Been Revised Several Times
4...Diary Record Prior Date Created Without Diary Summary or Schedule
5...Time Append Diary Menu in SDS Record to Create Prior Date Diary
6...Menu for SDS Record Diary Option Modify to Append Time Specification
7...000003 Menu Diary Option SDS Record Modify Append Time Specification
8...0042 Create New Diary Record from Current Archived Diary Record
9...004 Create Diary Pior Date Distinguish from Schedule New Task
10...Diary Pior Date Distinguish from Schedule New Task in Macro 004
11...Help Update to Explain New Method for Creating Prior Date Diary


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

CONTACTS 

SUBJECTS
New Task Schedule Restore Original Cursor Positioning Maintain User
Prior Date Create New Record in Diary Summary Rather than in the Sch
SDS Record Prior Date Create New Archived Record Using Current Archi
Evaluation Prior Date Create New Archived Diary Record Using Current

0906 -
0906 -    ..
0907 - Summary/Objective
0908 -
090801 - Follow up ref SDS 5 0000, ref SDS 4 0000.
090802 -
090803 - SDS changed to make creating a diary record for a prior date using
090804 - another record as a template much faster and easier.  New procedure
090805 - takes fewer steps and is much faster. ref SDS 0 JK5H  Updated Help to
090806 - explain new procedures. ref SDS 0 BB5L
090807 -
090808 -      [On 050908 Gary provided code and collaboration support to enter
090809 -      day of the week based on date of record using Zeller's Congruence
090810 -      formula. ref SDS 8 BV8J
090812 -       ..
090813 -      [On 090404 0041 modified code to process schedule tasks into
090814 -      archived diary records for prior dates. ref SDS 9 0001
090815 -
090816 -
090817 -
090818 -
090819 -
090820 -
090822 -  ..
0909 -
0910 -
0911 - Evaluation
0912 -
091201 - Diary Prior Date Time Effort Reduced 90%
091202 -
091203 - Follow up ref SDS 6 C16D.
091204 -
091205 - Creating a diary record for a prior date is much faster and easier
091206 - with changes today.  Previously, this took 20 steps or so, and from 1
091207 - - 6 minutes; this now takes 2 or 3 steps and a few seconds to execute.
091209 -  ..
091210 - The code cannot enter the day of the week, because we do not have a
091211 - way to calculate this date and calendar factor.
091212 -
091213 -           [On 050908 added support for entering day of the week based
091214 -           the date of the record. ref SDS 8 J14L
091216 -  ..
091217 - New procedure...
091218 -
091219 -    1.  Open diary record to use for a prior date diary.
091221 -         ..
091222 -    2.  Open menu bar and enter the date and time for a new record in
091223 -        the Diary menu, as shown below, ref SDS 0 WS3M; press Enter
091225 -         ..
091226 -        The new diary is created instantly.
091228 -         ..
091229 -    3.  Type the description for the new record and press F2.
091230 -
091231 -
091232 -
091233 -
091234 -
091235 -
0913 -

SUBJECTS
Background Prior Date Diary Record Create New Archived Record Using

1103 -
1104 - Background
110501 -  ..
110502 - Diary for Prior Date Has Been Revised Several Times
110503 -
110504 - On 030816 improved task to create a record for a prior date.
110505 - ref SDS 2 0001  Original work was performed on 900812. ref SDS 1 0001
110507 -  ..
110508 - Gary called on 050503 and suggested ideas to combine functions of the
110509 - standard routine to create a record for a prior date, with the new
110510 - function to create a blank record for a prior date.  His record for
110511 - 050503 summarizes the discussion. ref SDS 7 0001
110512 -
110513 -
110514 -
1106 -

SUBJECTS
Prior Date Create New Record in Diary Summary Rather than in the Sch
New Task Schedule Restore Original Cursor Positioning Maintain User
SDS Record Prior Date Create New Archived Record Using Current Archi
Background Prior Date Diary Record Create New Archived Record Using

1506 -
1507 - Planning
150801 -  ..
150802 - Diary Record Prior Date Created Without Diary Summary or Schedule
150803 -
150804 - Gary provides an implementation scheme in his record on 050503....
150805 -
150806 -    1.  Create a new blank record in the Diary Summary with existing
150807 -        methods using approximately eight (8) steps, reported on
150808 -        030816. ref SDS 2 TP56
150810 -         ..
150811 -    2.  Turn linking on with F5 (or even F3 to go to the Diary).
150812 -
150813 -        F5 and F3 can both set a global flag when there is a blank
150814 -        diary record to let the 004 function that creates a new record
150815 -        know to replace the contents of the current record, rather than
150816 -        create a new record in the Schedule.
150818 -         ..
150819 -    3.  Locate and open a record to use as a template.
150821 -         ..
150822 -    4.  Press F1 Shift-F1 to create a new record based on this one.
150823 -        Since linking is on, the system will verify that this is an
150824 -        empty record (either not on disk or check for "does not exist
150825 -        message"), and then replace the record where there is a link
150826 -        with a record based on the open record as a template.
150828 -         ..
150829 -    5.  Press F2 to save the record and update the pointers.
150831 -  ..
150832 - This would take about 12 steps.
150834 -  ..
150835 - The process can be reduced to about one step using the existing menu
150836 - system for constructing an SDS diary summary from the menu bar of an
150837 - SDS archived diary record.  We could...
150838 -
150839 -    1.  Menu choice to complement....
150840 -
150841 -                     Schedule Follow Up
150842 -
150843 -        ...with another choice...
150844 -
150845 -                     Diary for Prior Date
150847 -         ..
150848 -        Pressing Enter or clicking on the choice would open a place to
150849 -        enter a diary specification like...
150850 -
150851 -                     041014 1034
150853 -         ..
150854 -        Alternatively, we could eliminate the alternate menu choice,
150855 -        and if the user types a diary spec with time appended over the
150856 -        menu choice for....
150857 -
150858 -                     Schedule Follow Up
150859 -
150860 -        ...the code would use the current diary record to construct a
150861 -        new diary for the specified date.
150863 -         ..
150864 -    2.  Menu bar option in an archived SDS diary record...
150865 -
150866 -                     Diary
150867 -
150868 -        ...currently to get a diary summary, the user types a
150869 -        specification.  One of the formats for calling a diary summary
150870 -        is to enter a date string over "Diary" in the menu bar thus...
150871 -
150872 -                     041014
150874 -         ..
150875 -        This common command task can be amended slightly by appending a
150876 -        time specification thus,,,
150877 -
150878 -                     041014 1034
150879 -
150880 -        ...or even...
150881 -
150882 -                     0410141034
150884 -         ..
150885 -        When Enter is pressed, the current record is turned into a
150886 -        template for a diary record for the specified date and time.
150887 -
150888 -            [On 090404 0041 modified code to process schedule tasks
150889 -            into archived diary records for prior dates. ref SDS 9 S07L
150891 -         ..
150892 -        This scheme enables the code to intelligently distinguish user
150893 -        objectives between calling a diary summary or creating a new
150894 -        archived diary record for a prior date, and without compounding
150895 -        current menu choices.
150897 -         ..
150898 -        The simplicity of this method complements the current method of
150899 -        calling a diary with only the date, which is already familiar
150900 -        to people.  Adding the time is essential for identifing an SDS
150901 -        record, but is not needed to open a diary record from the menu.
150902 -        Therefore, these methods are always easily applied, and there
150903 -        is no danger of getting mixed up.
150905 -         ..
150906 -        We need to change the menu code for an SDS record in 000003 to
150907 -        recognize when a time spec is entered. ref OF 3 N76L
150909 -         ..
150910 -        Macro 817 in 000003 reads the diary menu with macro 1182
150911 -        starting at counter 180. ref OF 3 PJ9N
150913 -         ..
150914 -        It should be a simple matter for the code to call 0042 and
150915 -        create a diary for a prior date when the following conditions
150916 -        are met...
150917 -
150918 -              1     1
150919 -              8     8
150920 -              0123456789
150922 -               ..
150923 -              9605231015
150925 -               ..
150926 -              960523 1015
150928 -         ..
150929 -        This lets people enter a single string, or add a space to
150930 -        separate date from time.
150931 -
150932 -
150933 -
150934 -
150935 -
1510 -

SUBJECTS
Menu Code Modify Diary Option in SDS Record Menu Bar to Interpret Wh

1603 -
1604 - Progress
160501 -  ..
160502 - Time Append Diary Menu in SDS Record to Create Prior Date Diary
160503 - Menu for SDS Record Diary Option Modify to Append Time Specification
160504 - 000003 Menu Diary Option SDS Record Modify Append Time Specification
160505 -
160506 - Generally, it seems that, once the call is generated, all of the work
160507 - will occur in 0042, and that 004 will run the same way, as explained
160508 - on 031014. ref SDS 3 DJ6F
160509 -
160511 -  ..
160512 - Line 820, ref OF 3 N76L, -label diary9 in 000003
160513 -
160514 -    macro 817
160515 -    setcnt 117 0
160516 -    setcnt 118 0
160517 -    setcnt 119 0
160518 -    -if @187 < 58 -if @187 > 47 setcnt 117 1
160519 -    -if @188 < 58 -if @188 > 47 setcnt 118 1
160520 -    -if @189 < 58 -if @189 > 47 setcnt 119 1
160521 -    -if @117 = 1 -if @118 = 1 -if @119 = 1 -goto cdfpd
160522 -    -goto ctcsd
160523 -    -label cdfpd
160524 -    @c:\sd\03\0042 #2............................... ref SDS 0 NX6K
160525 -    -exit
160526 -    -label ctcsd
160527 -    macro 96
160528 -    -exit
160529 -
160530 -          Menu macro 802 interprets diary specification entered by
160531 -          user; the code checks for a date followed by a time
160532 -          specification beginning either on the next column after the
160533 -          end of the date, or there can be a space, and in that case,
160534 -          the code will macro 0042 #2 to use the current record for a
160535 -          prior date diary on the date specified by the User.
160537 -             ..
160538 -            [On 090404 0041 modified code to process schedule tasks
160539 -            into archived diary records for prior dates. ref SDS 9 K966
160540 -
160541 -
160542 -
160543 -
160544 -
160545 -
1606 -

SUBJECTS
Prior Date Diary Create New Diary Record from Current Archived Diary

1703 -
170401 -  ..
170402 - 0042 Create New Diary Record from Current Archived Diary Record
170403 -
170404 - Line 30, ref OF 2 NW4N, -goto crfpdd in 0042
170405 -
170406 -    -goto crfpdd
170407 -
170408 -        This is a new sublevel in 0042 for calling code to use the
170409 -        current record for constructing a new diary record on a
170410 -        specified date.
170411 -
170412 -            [On 090404 0041 modified code to process schedule tasks
170413 -            into archived diary records for prior dates. ref SDS 9 NX6K
170414 -
170416 -  ..
170417 - Line 140, ref OF 2 4E5M, -label crfpdd in 0042
170418 -
170419 -    -label crfpdd
170420 -    datecnt 105 0
170421 -    modcnt 105 100
170422 -    subcnt 180 48
170423 -    mulcnt 180 10
170424 -    subcnt 181 48
170425 -    addcnt 181 @180
170426 -    -if @181 < @105 -goto prDate
170427 -    -if @181 > 50 -goto prDate
170428 -    -if @181 > @105 -goto fuDate
170429 -    subcnt 182 48
170430 -    mulcnt 182 10
170431 -    subcnt 183 48
170432 -    addcnt 183 @182
170433 -    -if @183 < @106 -goto prDate
170434 -    -if @183 > @106 -goto fuDate
170435 -    subcnt 184 48
170436 -    mulcnt 184 10
170437 -    subcnt 185 48
170438 -    addcnt 185 @184
170439 -    -if @185 < @107 -goto prDate
170440 -    -label fuDate
170441 -    errormsg  Prior date diary cannot be today or in future!
170442 -    beep
170443 -    -goto end2
170444 -
170445 -        This code executes datecnt to compare current date with the
170446 -        date entered by the user for creating a new record for a prior
170447 -        date, and captured with menu macro 802 which calls macro 817
170448 -        per above. ref SDS 0 O08N  Since the date specification entered
170449 -        in the menu by the user is captured as characters, and since
170450 -        datecnt command determines the date with numbers, the character
170451 -        specification is converted into numbers, and the year is
170452 -        converted into a 2 digit value for making the comparison.  Y2K
170453 -        issues are resolved by assuming a two char specification that
170454 -        computes to a year value greater than 50, is necessarily less
170455 -        than the current date.  If the code calculates the user
170456 -        entered either the current date or a future date, an error
170457 -        message is returned.
170458 -
170459 -
170461 -  ..
170462 - Line 210, ref OF 2 V55H, -label prDate in 0042
170463 -
170464 -    -label prDate
170465 -    markcur 17
170466 -    e c:\sd\03\0042
170467 -    line                   && *%pdd
170468 -    loc_cur 3 15
170469 -    setgbl 86 180
170470 -    macro 1181
170471 -    datecnt 1 0
170472 -    -if @6 < 10 ic 48
170473 -    inscnt 6 0
170474 -    *%pdd
170475 -    setgbl 117 8888
170476 -    ecur 17
170477 -    -goto jpdpd..................................... ref SDS 0 NY5O
170478 -
170479 -        This code saves the date and time for creating a new record in
170480 -        the code macro file 0042, and then sets a global flag to
170481 -        establish this operation is underway.
170482 -
170483 -
170485 -  ..
170486 - Line 240, ref OF 2 2Z5F, -label jpdpd in 0042
170487 -
170488 -    line                  && *%wk
170489 -    loc_cur 4 7
170490 -    setcnt 86 1
170491 -    macro 1181
170492 -    getgbl 117 117
170493 -    -if @117 = 8888 -goto crpd2
170494 -    setcnt 117 0
170495 -    setgbl 117 0
170496 -
170497 -        Existing code enters filename for current record in code to
170498 -        pruge the current record.  Add code today that gets the new
170499 -        global flag, and if this is the op to create a record for a
170500 -        prior date, then skip code that captures the record name, and
170501 -        jump to the code that purges the current record, so the next
170502 -        step is to open the new record.
170503 -
170504 -
170505 -
170507 -  ..
170508 - Line 310, ref OF 2 6T6H, -label crpd2 in 0042
170509 -
170510 -    -label crpd2
170511 -    macro 23
170512 -    setcnt 86 1
170513 -    macro 1182
170514 -    e stufq
170515 -    loc_cur 0 40
170516 -    setcnt 86 1
170517 -    macro 1181
170518 -    -label ncndr
170519 -    *%wk
170520 -    purge d:
170521 -    getgbl 117 117
170522 -    -if @117 != 8888 -goto oscntf
170523 -    save
170524 -    dose /c c:\sd\01\004.bat
170525 -
170526 -        macro 23 jumps 0042 back to the location of the filename for
170527 -        the new SDS record; macro 1182 reads the filename; e stufq
170528 -        switches to the transfer file for the start command op in
170529 -        004.bat; loc_cur 0 40 places the 33 char filename for the new
170530 -        record to be created on the same place that the code in 004
170531 -        looks for the User ID; so if the code instead encounters a
170532 -        filename, then it will adjust processing to save the new file
170533 -        to correct filename.  stufq now has the object filename to open
170534 -        and process, and the filename for creating the new record.
170535 -        Since processing is in stufq, the object file can now be
170536 -        purged. -label ncndr is for the original code to setup a new
170537 -        task in the schedule.  If creating a new diary record, then
170538 -        save stufq to the disk and run dose to call Windows Start
170539 -        command that runs macro file 004 on the object SDS record for
170540 -        converting into a new diary record.
170541 -
170542 -
170544 -  ..
170545 - Line 440, ref OF 2 EH5I, -label ncndr in 0042 about 120 lines below
170546 -
170547 -    e d:\sd\08\uuuuu\02\yy\mm\dd
170548 -    purge stufq
170549 -    setgbl 117 0
170550 -    gfname
170551 -    top
170552 -    ins_text !                                             !
170553 -    ic @19
170554 -    ic @20
170555 -    top
170556 -    strcnt 3 2
170557 -    -if @3 < 50 setcnt 1 1
170558 -    -if @3 > 49 setcnt 1 2
170559 -    -if @1 = 1 addcnt 3 2000
170560 -    -if @1 = 2 addcnt 3 1900
170561 -    top
170562 -    ic @22
170563 -    ic @23
170564 -    top
170565 -    strcnt 4 2
170566 -    ic @25
170567 -    ic @26
170568 -    top
170569 -    strcnt 5 2
170570 -    ic @28
170571 -    ic @29
170572 -    top
170573 -    strcnt 6 2
170574 -    ic @30
170575 -    ic @31
170576 -    top
170577 -    strcnt 7 2
170578 -    ic @32
170579 -    ic @33
170580 -    top
170581 -    strcnt 8 2
170582 -    macro 852
170583 -    loc_cur 0 36
170584 -    ins_text !DIARY!
170585 -
170586 -        After dose runs start command to call 004 that creates the new
170587 -        diary record file, open the file for the new record, and then
170588 -        purge stufq that contains trasfer data; gfname captures the
170589 -        filename and then each char is entered at the top of the SDS
170590 -        record where the date field will be entered, and this char is
170591 -        then read as a number to calculate the date for enter a
170592 -        standard format with words and numbers; macro 852 then enters
170593 -        the date of the record on line for standard record
170594 -        identification.  loc_cur 0 36 positions the cursor and then
170595 -        DIARY is entered for the standard record header.
170596 -
170597 -           [On 050908 added support for entering day of the week based
170598 -           the date of the record. ref SDS 8 J14L
170599 -
170600 -
170602 -  ..
170603 - Line 470, ref OF 2 EM6K, -label ncndr in 0042 about 130 lines below
170604 -
170605 -    macro 856
170606 -    setcnt 47 2
170607 -    macro 150
170608 -    setcnt 271 2000
170609 -    top
170610 -    loc_cur 5 6
170611 -    tl 0
170612 -    errormsg  New record created; enter description press F2
170613 -    -goto end2
170614 -
170615 -        Complete configure new SDS diary record ready for editing. tl
170616 -        0 turns off titles and loc_cur 5 6 puts the cursor in position
170617 -        for the user to enter a new record description; message tells
170618 -        user to enter a description and press F2 to save the record
170619 -        with pointers.
170620 -
170621 -
170622 -
170623 -
170624 -
170625 -
1707 -

SUBJECTS
Diary Pior Date Distinguish from Schedule New Task in Macro 004

1803 -
180401 -  ..
180402 - 004 Create Diary Pior Date Distinguish from Schedule New Task
180403 - Diary Pior Date Distinguish from Schedule New Task in Macro 004
180404 -
180405 - Macro 004 is currently called in a secondary memory segment using the
180406 - Microsoft start command launched by macro file 0042 that sets up a
180407 - transfer file with paramters that tell 004 whether to construct a new
180408 - archieved diary record or a new Scheduled task.
180410 -  ..
180411 - New code added today extends the purpose of 004 from simply creating
180412 - new tasks in the Schedule to now writing a new archived diary record
180413 - for a prior date, per planning above. ref SDS 0 H16F
180415 -  ..
180416 - Line 60, ref OF 1 GB4O, in 004
180417 -
180418 -    loc_cur 0 41
180419 -    chrcnt 116 0
180420 -    rel_cur 0 -1
180421 -    -if @116 = 58 setcnt 86 180
180422 -    -if @116 != 58 setcnt 86 1
180423 -    macro 1182
180424 -    -if @116 != 58 -goto cnst
180425 -    setgbl 275 @189
180426 -    setgbl 276 @190
180427 -    setgbl 277 @191
180428 -    setgbl 278 @192
180429 -    setgbl 279 @193
180430 -    -goto gflnm.............................. ref SDS 0 H49F
180431 -
180432 -        Changed the existing code to read col 41 in the stufq transfer
180433 -        file construced by macro file 0042, per above, ref SDS 0 6T8G,
180434 -        and if chrcnt 116 0 finds a colon ":" this means the user wants
180435 -        to use the current archived diary record as a template to
180436 -        create another SDS record for a date prior to the current date.
180437 -        If creating a prior date diary record, then macro 1182 reads
180438 -        the filename spec beginning with counter 180, so that the
180439 -        object filename specification used for the template SDS diary
180440 -        record can be read beginning with counter 1.  For the op to
180441 -        create a new diary record, transfer the user ID part of the
180442 -        filename spec into the standard counters for the session User
180443 -        ID.
180444 -
180446 -  ..
180447 - Line 110, ref OF 1 AN6J, -label gflnm in 0042
180448 -
180449 -    -label gflnm............................. ref SDS 0 AI5J
180450 -    loc_cur 0 1
180451 -    setcnt 86 1
180452 -    macro 1182
180453 -    setgbl 116 @116
180454 -    -if @116 = 58 -goto sgfns1
180455 -
180456 -        After capturing the filename for the template SDS record, if
180457 -        the op is to create a diary for a prior date, jump ahead.
180458 -
180459 -
180461 -  ..
180462 - Line 140, ref OF 1 ET5J, -label sgfns1 in 0042
180463 -
180464 -    -label sgfns1
180465 -    e c:\sd\03\004
180466 -    purge stufq
180467 -    line                                                       && *%dm
180468 -    getgbl 116 116
180469 -    -if @116 = 58 -goto sgfns2
180470 -
180471 -        This code sets up to load the savx command that will write the
180472 -        new SDS record to the disk as either a Scheduled task or an
180473 -        archived diary record; control switches into macro file 004 to
180474 -        enter the filename captured above from the transfer file; for
180475 -        creating a prior date diary record jump ahead.
180476 -
180478 -  ..
180479 - Line 170, ref OF 1 OW8H, -label sgfns2 in 0042
180480 -
180481 -    -label sgfns2
180482 -    loc_cur 4 6
180483 -    -label efnnsr
180484 -    setcnt 86 180
180485 -    macro 1181
180486 -
180487 -        Merely add code loc_cur 4 6 to setup position for entering an
180488 -        SDS record filename specification.
180489 -
180491 -  ..
180492 - Everything else is the same.
180493 -
180494 -
180495 -
180496 -
1805 -

SUBJECTS
Default Null Subject Account for Blank Record

1903 -
190401 -  ..
190402 - Help Update to Explain New Method for Creating Prior Date Diary
190403 -
190404 - Explanation of diary for prior date is in H: SD 05 15 @0511,
190405 - ref OF 8 0000
190406 -
190407 - Added links to explanation of new procedure in help...
190408 -
190409 -        Schedule New Tasks & Linking
190410 -        H: SD 05 02 020301...................... ref OF 4 0000
190412 -         ..
190413 -        Schedules & Diaries
190414 -        H: SD 05 02 0206........................ ref OF 5 0000
190416 -         ..
190417 -        S C H E D U L E
190418 -        H: SD 05 10 22.......................... ref OF 6 0000
190420 -         ..
190421 -        Schedule or Diary Status
190422 -        H: SD 05 14 141F08...................... ref OF 7 0000
190423 -
190424 -
190425 -
190426 -
190427 -
190428 -
190429 -
190430 -
190431 -
190432 -
1905 -