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: August 23, 2003 11:18 AM Saturday; Rod Welch

SDS function to format documents read into SDS record with get command.

1...Summary/Objective
2...Diary Menu "Get Doc" Command Saves Time and Reduces Learning Curve
3...New Procedure Easy as 1, 2, 3....
4...Enter Documents into SDS Narrative from Email without Cut and Paste
5...00702 Read Doc File into SDS, Format Line Numbers and Add Outlining
6...050405 Add Function Call to 00702 to Get Document Format Line Numbers

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

1...Need input from Gary on effectiveness for reducing learning curve and
2...With more compiler space, a user input screen could be fashioned based

CONTACTS 

SUBJECTS
SDS Documents Format Line Number Structure add Outlining to Bridge Ga
Format Structure Provide Flexible Consistency Line Numbers Record Seg
Documents SDS Format Line Number Structure add Outlining to Bridge Ga
Keystrokes Reduce Integrate Consolidate Commands Functions Productivi
20 - 50 Keystrokes Eliminated SDS Documents Format Line Number Struct

0907 -
0907 -    ..
0908 - Summary/Objective
0909 -
090901 - Follow up ref SDS 8 0000, ref SDS 7 0000.
090902 -
090903 - Developed new feature in the Diary menu of SDS records to call a macro
090904 - file that reads a document into an SDS record, ref SDS 0 XB9H, at a
090905 - location chosen by the user, ref SDS 0 5L6J, and maintains SDS
090906 - flexible structure, plus adds initial outlining. ref SDS 0 T43F  This
090907 - saves considerable time by eliminating keystrokes, and further reduces
090908 - the learning curve for using SDS.  Making tasks faster and easier
090909 - narrows the gap to bridge between the 2 worlds of IT and Com Metrics
090910 - that enables a culture of knowledge. ref SDS 0 EF4O
090912 -         ..
090913 -        [On 031016 added feature to suppress email address from
090914 -        publication on the web. ref SDS 9 0001
090915 -
090916 -
090917 -
090919 -  ..
0910 -
0911 -
0912 - Evaluation
0913 -
091301 - Diary Menu "Get Doc" Command Saves Time and Reduces Learning Curve
091302 -
091303 - Follow up ref SDS 8 O44L, ref SDS 7 PPTR.
091304 -
091305 - The new feature seems to realize objectives of saving time and money
091306 - by consolidating commands to reduce keystrokes for a common task of
091307 - handlng documents. ref SDS 0 EF7I  Since email is a predominate form
091308 - of communication, the change today may be a big step toward bridging
091309 - the gap between 2 worlds of IT and SDS.
091311 -  ..
091312 - This adds to the growing list of improvements that save keystrokes
091313 - using SDS shown in the record on 000824. ref SDS 2 0001  The advantage
091314 - of saving time and money by reducing keystrokes is calculated in the
091315 - record on 021228. ref SDS 5 6C9M
091317 -  ..
091318 - Need input from Gary on effectiveness for reducing learning curve and
091319 - accomodating issues related to Microsoft Outlook for email and Word
091320 - for documents.  On 030316 Gary reported a problem managing received
091321 - documents that reduces command and control of the work. ref SDS 6
091322 - 7J7I  Does this new capability help address this problem?
091323 -
091324 -     [On 031020 developed new system using the Windows Start command
091325 -     suggested by Gary for opening files using other software programs.
091326 -     ref SDS 10 7F4K
091328 -      ..
091329 -     [On 031026 asked Gary for feedback on reducing the time and effort
091330 -     for using good management, ref SDS 11 TV6J; suggested models and
091331 -     simulations on improving command and control of the work for
091332 -     common use cases. ref SDS 11 9S9I
091334 -  ..
091335 - This complements consolidating commands and reducing keystrokes for
091336 - creating a letter in SDS, developed on 021013. ref SDS 4 0001
091338 -  ..
091339 - Previously, following steps were needed to get a document file into
091340 - SDS for analysis....
091341 -
091342 -    1.  In an email or in Word, etc., save the file to x.txt.
091343 -    2.  Open the file x.txt in SDS using F1 F3
091344 -    3.  Turn on cut and paste, Shift F5
091345 -    4.  Move to top of area for transporting into SDS.
091346 -    5.  Place cursor on left margin and Press F5 for UL
091347 -    6.  F5 for UL
091348 -    7.  Move to bottom of area for copying the file.
091349 -    8.  F8 shift screen to place the cursor on the righ margin.
091350 -    9.  F6 for LR
091351 -   10.  F3 or F4 to copy or cut the defined area into a file
091352 -   11.  F1 to restore profile
091353 -   12.  Ctrl F7 to restore cursor to original location.
091354 -   13.  Ctrl F6 several times switches to target SDS record.
091355 -   14.  F9 and F10 scroll the target record to the correct position.
091356 -   15.  Arrow keys or mouse place cursor for entering text
091357 -   16.  Shift F5 turn on Cut and Paste.
091358 -   17.  F5 to mark position for entering content of cut file.
091359 -   18.  Ctrl F5 to copy contents of cut file into SDS record.
091360 -   19.  Alt F3 to empty cut file.
091361 -   20.  F1 to switch from Cut and Paste Profile to SDS profile
091362 -   21.  F1 F8 perhaps several times to re-position the text.
091363 -   22.  Outline for each para takes 10 - 30 keystrokes
091365 -         ..
091366 -   23.  Windows cut and past often creates an extremist margin conditon
091367 -        that either crashes SDS or takes a lot of extra time moving the
091368 -        into position that is ready for people to begin analysis.
091369 -
091371 -  ..
091372 - New Procedure Easy as 1, 2, 3....
091373 -
091374 -    1.  In an email or in Word, etc., save the file to x.txt.
091375 -    2.  Position SDS record where the document should be entered.
091376 -    3.  Open SDS Diary menu and click on Get Document...
091378 -  ..
091379 - At this point all of the above 20 - 50 keystroks are complete.
091380 - ref SDS 0 WT8M
091382 -  ..
091383 - Practice may show things are not quite this smooth, but the change
091384 - from 20 - 50 keystrokes down to to about 2 seems helpful.
091385 -
091386 -
091387 -
091388 -
091389 -
091390 -
091392 -  ..
0914 -
0915 -
0916 - Planning
0917 -
091701 - Enter Documents into SDS Narrative from Email without Cut and Paste
091702 -
091703 - Gary has mentioned from time to time the need to revise SDS for saving
091704 - time and money by making the task fast and easy to read into an SDS
091705 - record a document and create positioning ready for analysis to save
091706 - lives, time and money.
091708 -  ..
091709 - Microsoft cut and past enters text into SDS that requires a lot of
091710 - work  (e.g., time and money) to position the text for analysis.  As
091711 - well, Medit cut and paste is hard to learn and is awkward to use with
091712 - conventional keyboards.  Gary has also noted that Medit cut and paste
091713 - is somehow different conceptually from other applications, and this
091714 - makes SDS difficult to learn and apply routinely for saving time and
091715 - money.  On 920215 Morris noted that counterintuitive design makes SDS
091716 - hard to learn.  Generally, rather than work to support improvement,
091717 - people give up. ref SDS 1 5820  Refusal to work with less than perfect
091718 - tools in order to refine performance has delayed progress on advancing
091719 - from information to a culture if knowledge, as reported on 021013.
091720 - ref SDS 4 8Z8L  Gary Johnson, however, has worked hard to apply SDS
091721 - despite counterintuitive design and a pilot-test-level implementation.
091722 - As a result, Gary's reports of experience provide opportunity to make
091723 - improvements that mitigate difficulties.  This added feedback augments
091724 - the development process that Morris cited on 010924 for enabling SDS
091725 - to improve management where others fail. ref SDS 3 NK4J
091727 -  ..
091728 - The Medit "get" command, eliminates using cut and paste features in
091729 - both Microsoft and SDS.  The "get" command produces a format exactly
091730 - as the rendered in an email or other text file, and so eliminates a
091731 - lot of keystrokes to save time and money, per above. ref SDS 0 PI5G
091733 -  ..
091734 - Even though experience shows that investing time and money to bring
091735 - information into SDS records for adding intelligence to generate
091736 - knowledge saves a lot of time and money under the common rule that
091737 - "knowledge is power," and even though evidence shows that using SDS
091738 - for Com Metrics under the present design has validated the rule, there
091739 - is still strong incentive to make using SDS faster and easier by
091740 - reducing the time to learn and the time to use SDS on the job
091741 - day-to-day.  A long learning curve causes all but the few highly
091742 - motivated users to get discouraged and quit before there is an
091743 - opportunity for deferred benefits of "knowledge" that saves time and
091744 - money to materialize.  To hold a greater share of new users long
091745 - enough to discover rewards of working "intelligently," we need to
091746 - narrow the gap between the 2 worlds of IT and Com Metrics that enables
091747 - a culture of knowledge by reduce the time for doing tasks.  Even for
091748 - experienced and committed users there is obvious incentive to reduce
091749 - keystrokes that save time using SDS, so there is more time to convert
091750 - a greater share of daily working information into kowledge under the
091751 - common rule that "time is money."
091753 -  ..
091754 - Since Microsoft Word files can be reduced to text, the "get" command
091755 - provides a method that is fast and easy for getting information
091756 - created by conventional technology into the flexible structure of SDS
091757 - records where deliberative analysis can be performed to organize,
091758 - align, summarize, and manage feedback to refine accuracy and context.
091760 -  ..
091761 - Accordingly, we need some functionality to augment the Medit "get"
091762 - command for automatically conforming the format to SDS line numbers
091763 - for flexible structure. ref SDS 0 U45G
091765 -  ..
091766 - Outline support can be added. ref SDS 0 T43F
091768 -  ..
091769 - Anchors are automatically added when F2 is pressed to save the record.
091770 - ref SDS 0 EH7J
091772 -  ..
091773 - The code will initially require the file to be read in with a fixed
091774 - path and filename.  Since we are starting in c: sd 10, will use x.txt.
091775 - There are a lot of occassions when an email file is html, with the
091776 - result that the filename is x.htm.  In those cases the user will have
091777 - to manually rename to x.txt.
091779 -  ..
091780 - With more compiler space, a user input screen could be fashioned based
091781 - on the code for F1 F3 to set up a default that gets x.txt, but allow
091782 - the user to quickly edit this to x.htm, to just x, or to anything.
091783 -
091784 -
091785 -
091787 -  ..
0918 -
0919 -
0920 - Progress
0921 -
092101 - 00702  Read Doc File into SDS, Format Line Numbers and Add Outlining
092102 -
092103 - This code will use "get" command.  User will place the cursor anywhere
092104 - in the narrative where a file can be read in, and call the menu to
092105 - "Get document..." ref SDS 0 XB9H  If a mistake occurs, the system will
092106 - give instructions on what to do to try again.
092108 -         ..
092109 -        [On 031016 added feature to suppress email address from
092110 -        publication on the web. ref SDS 9 61BB
092111 -
092113 -  ..
092114 - Line 30, ref OF 1 414J, 00702
092115 -
092116 -    setlen 1 0
092117 -    -if @1 < 10 -goto sobl
092118 -    beep
092119 -    errormsg  "Get Document" start on a blank line
092120 -    -goto purg
092121 -
092122 -        Force command to start on a blank line; if the length is less
092123 -        than 10 it is blank, so proceed, otherwise return an error
092124 -        message.
092125 -
092127 -  ..
092128 - Line 40, ref OF 1 K05M, -label sobl in 00702
092129 -
092130 -    -label sobl
092131 -    macro 22
092132 -    loc_cur 0 1
092133 -    macro 1361
092134 -    getscr 9
092135 -
092136 -        This is a blank line, so may be good for go; macro 22 saves
092137 -        location to return to original location.  Put cursor on column
092138 -        1 to evaluate line number for verifying cursor has started the
092139 -        operation below the Reference field.  Use macro 1361 to read 6
092140 -        columns, then restore cursor with getscr 9, which is set in
092141 -        macro 22.
092142 -
092144 -  ..
092145 - Line 50, ref OF 1 PPSX, -label sobl in 00702 about 20 lines below
092146 -
092147 -    -if @1 = 48 -if @2 < 52 -goto nnse
092148 -    -if @5 = 32 -goto nnse
092149 -    -goto good
092150 -
092151 -        If 1st col is 0 and next is less than 4, it is an error, so
092152 -        -goto nnse and report to user. ref SDS 0 886L  If 5th column is
092153 -        blank, it is a six place line number and so is an error.
092154 -        Otherwise it is a good condition, so -goto good. ref SDS 0 X43N
092155 -
092157 -  ..
092158 - Line 60, ref OF 1 887N, -label nnse in 00702
092159 -
092160 -    -label nnse
092161 -    beep
092162 -    errormsg  Get Doc call in narrative below References
092163 -    -goto purg
092164 -
092165 -        User did not execute command from narrative, so return error
092166 -        message, and end process, -goto purg
092167 -
092169 -  ..
092170 - Line 80, ref OF 1 X99J, -label good in 00702
092171 -
092172 -    -label good
092173 -    immed r
092174 -    immed /
092175 -    loc_cur 4 1
092176 -    ins_text !%j$!
092177 -
092178 -        Code has determined the "get doc" command was executed in the
092179 -        narrative on a blank line that has 6 places.  This is a "good"
092180 -        condition for reading in a document.  Repeat the line to create
092181 -        a line to use for the target that determines when the process
092182 -        will be completed.  Move cursor line to current line to read in
092183 -        the file with get command.  Put the cursor on the new blank
092184 -        line just created which is one line below the current line, and
092185 -        create a unique string that will not likely be in the document
092186 -        and so can be used to find the bottom of the lines just read
092187 -        into the SDS record.
092188 -
092190 -  ..
092191 - Line 90, ref OF 1 7G4N, -label good in 00702 about 20 lines below
092192 -
092193 -    loc_cur 3 1
092194 -      linecnt 65 0
092195 -    errorcnt 0 0
092196 -    tl 0
092197 -    g x.txt
092198 -    macro 16
092199 -    z 1 3
092200 -    l /%j$/
092201 -    linecnt 36 0
092202 -
092203 -        Move cursor to current line where get command will execute and
092204 -        change the line number in counter 65 used in macro 23 to the
092205 -        new current line, so that the user can be restored at the end
092206 -        of the process with the document at the top of the screen.
092207 -        Turn titles off, tl 0, and then read in the file.  Will try
092208 -        using get x.txt to start, because a lot of this type of effort
092209 -        is email and we typically save email to x.txt.  However for
092210 -        some formats user's generate HTML text and this initially
092211 -        starts with x.htm.  This is easy to change to x.txt for the
092212 -        purpose of this operation.  It is a little klutzy, but will try
092213 -        this.  After reading in the target file, mark the location to
092214 -        come back.  Use locate command to find the unique string
092215 -        created above, ref SDS 0 X43N, and capture the line number to
092216 -        evaluate when all of the new lines have been processed.
092217 -
092219 -  ..
092220 - Line 140, ref OF 1 XM4M, -label good in 00702 about 70 lines below
092221 -
092222 -    -label lpup
092223 -    up
092224 -    setlen 1 0
092225 -    -gosub 17s
092226 -    -if @1 = 0 -goto lpup
092227 -    ins_text!000001 -    1.!
092228 -
092229 -        Starting at the top line above the doc lines just read in, do a
092230 -        loop to enter a line number format until there are no more
092231 -        blank lines.  The actual number doesn't matter because after
092232 -        this op, when user decides to keep the new stuff, F2 will
092233 -        updated line numbers.  Scroll up to the first doc line and call
092234 -        subroutine that offsets the line to column 17, and enters a
092235 -        line number format. -gosub 17s, ref SDS 0 U45G  Once the code
092236 -        scrolls up to the top line of text in the document, make it
092237 -        start at outline level 1, so the rest created by -gosub 17s
092238 -        will increment when F2 is pressed to save the record.
092239 -
092241 -  ..
092242 - Line 160, ref OF 1 GS6L, -label lpln1 in 00702
092243 -
092244 -    -label lpln1
092245 -    setcnt 1 0
092247 -     ..
092248 -    -label lpln2
092249 -    up
092250 -    linecnt 2 0
092251 -    -if @2 = @36 -goto end
092252 -    setlen 10 0
092253 -    -gosub 17s
092254 -
092255 -        Primary loop starts over with setcnt 1 0 as a flag to identify
092256 -        when a blank line is encountered, since that condition is used
092257 -        to enter another outline level for a new paragraph.  Scroll up
092258 -        and get the line number to compare with the line number for the
092259 -        end of the document read in and captured above in counter 36.
092260 -        ref SDS 0 7H5O  If this is the last line, then break out of the
092261 -        loop and end the thing. -goto end, ref SDS 0 EH7J  If it is not
092262 -        the end, then run the subroutine that shifts the current line
092263 -        to column 17 and enters a line number format. -gosub 17s,
092264 -        ref SDS 0 U45G
092265 -
092266 -
092268 -  ..
092269 - Line 170, ref OF 1 T37O, -label lpnl2 in 00702
092270 -
092271 -    -if @10 > 0 -if @1 = 1 ins_text!000001 -    2.!
092272 -    -if @10 > 0 -if @1 = 1 -goto lpln1
092273 -    -if @10 = 0 setcnt 1 1
092274 -    -goto lpln2
092275 -
092276 -        After running subroutine to shift the line and enter a line
092277 -        number format, if the line is not blank and if the line above
092278 -        is blank, then enter an alternate line number format with an
092279 -        outline element that does not signify the beginning of a new
092280 -        ordered structure, beginning with 1, A or a.  In that case,
092281 -        loop back to reset the para flag so that the next line will not
092282 -        get the outline structure until another blank line is
092283 -        encountered. -goto lpln1, ref SDS 0 GS4L, If the line is blank,
092284 -        then setcnt 1 1 is a flag that the next non-blank line will
092285 -        require an outline structure.  Loop back and do not reset para
092286 -        flag. -goto lpln2, ref SDS 0 T352,
092288 -         ..
092289 -        Even though a uniform outline element of "2" is used, rather
092290 -        than incremented, when F2 is used to save the record, both
092291 -        outlining and anchors will be automatically added.
092292 -
092294 -  ..
092295 - Line 180, ref OF 1 U99I, -label 17s in 00702
092296 -
092297 -    -label 17s
092298 -    split
092299 -    ins_text!000001 -      x!
092300 -    loc_cur 0 15
092301 -    join
092302 -    ic 32
092303 -    loc_cur 0 1
092304 -    -return
092305 -
092306 -        Subroutine that shifts the line to column 17 by doing a split,
092307 -        then entering a line number format with a place holder so that
092308 -        when join is executed the text line on column 1 will be on
092309 -        column 17, which is the default column for entering an outline
092310 -        structure on column 13.  Move cursor on column 15 and remove
092311 -        the temporary place holder to facilitate the join command.
092312 -        Then put the cursor back on column 1 to be ready for next step
092313 -        after this subroutine.
092314 -
092316 -  ..
092317 - Line 190, ref OF 1 EG4I, -label end in 00702
092318 -
092319 -    -label end
092320 -    ins_text!000001 - !
092321 -    immed 10r
092322 -    macro 23
092323 -    down 2
092324 -    loc_cur 7 17
092325 -    macro 142
092326 -
092327 -        End the operation by adding blank lines below the document
092328 -        lines.  Macro 23 restores the initial position of the file, and
092329 -        loc_cur 4 17 puts the cursor at the beginning of the document.
092330 -        Macro 142 saves revised record to update line numbers, add
092331 -        anchors to all para and increment outline structure.
092333 -         ..
092334 -        There is danger of saving a messed up record.  For example if
092335 -        memory is short and/or fragmented, and we read in a file the
092336 -        program cannot handle, there is danger of saving a messed up
092337 -        record.  Will take a chance and try this for while to see how
092338 -        things go.  We might consider making this a Start command op
092339 -        but if memory is fragmented in the current session, then even
092340 -        if everything goes will in a separate session, when the file is
092341 -        read in there could still be a problem.  The difference would
092342 -        be that the new record would be crated successfully and saved
092343 -        to disk, so that even if messed up when read into the current
092344 -        session, then closing the session and opening a new session,
092345 -        the new record is in tact rather than having to run the
092346 -        opration again.
092347 -
092348 -
092349 -
092350 -
092351 -
092352 -
092353 -
0924 -

SUBJECTS
Get Document and Format with Line Numbers and Outline Structure

100301 -  ..
100302 - 050405  Add Function Call to 00702 to Get Document Format Line Numbers
100303 -
100304 - Line 310, ref OF 2 MC5N, -label diary in 050405 about 60 lines below
100305 -
100306 -    ins_text "º Get Document and Format Line Numbers      º"
100307 -    loc_cur 0 80
100308 -    ins_text " @c:\sd\03\00702  "
100309 -    rel_cur 1 -58
100310 -
100311 -        Set up to call new function 00702 developed above, ref SDS 0
100312 -        5L6J, to get a document x.txt and format line numbers, plus
100313 -        add outlining.
100314 -
100315 -
100316 -
100317 -
100318 -
100319 -
100320 -
100321 -
100322 -
100323 -
100324 -
100325 -
100326 -
100327 -
1004 -