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: July 17, 2003 06:02 AM Thursday; Rod Welch

SDS function to conform changes and structure of organic structure.

1...Summary/Objective
2...050409 Subject Menu Add New Function to Align Account Code Format
3...03501 SI Main Profile Change Assignment for F1 F6
4...000007 F5 Target for Copy Linking and Update SI Account Structure
5...03507 New Function in SI to Align All Lines in an Account
6...F5 Alphabetical Sort and Remove Duplicate Subjects Pressed Twice
7...Alphabetical Sort and Remove Duplicate Subjects F5 Pressed Twice
8...Sort Descriptions and Delete Duplicates on 2nd Pass Pressing F8
9...F5 F5 Alphabetize Delete Duplicates
10...Timing Switch Doubles Performance of Subject Index Profile


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

CONTACTS 

SUBJECTS
Structure Flexible Consistent Format Line Numbers Record Se  ents
Format Codes for Subjects Conform All Lines in the Account Normalize
Search for Narrative Description in Subject Index to See What Codes A
Subject Index Format F5 Function to Create Uniform Format with One Ke
Productivity Integrate Consolidate Functions So Less to Remember in O
F5 Subjects Conform Format and Codes for All Lines in the Account Nor
Sort Delete Duplicate Descriptions for the Current Account in Subject
Double Click Expands Assignments for Profile Function Keys
2 Clicks Expands Assignments for Profile Function Keys

1411 -
1411 -    ..
1412 - Summary/Objective
1413 -
141301 - Follow up ref SDS 2 0000.
141302 -
141303 - Created a new function to reduce keystrokes and time for creating and
141304 - editing accounts in the subject index.  Added this functionality to F5
141305 - assigned only to SI as a complement to the target command for copy and
141306 - move commands. ref SDS 0 0076  F5 now has two new functions in the
141307 - Subject Index.  When pressed once, all lines are given the account for
141308 - the top line, and a uniform left margin is created for all
141309 - descriptions.  If pressed a second time within one or two seconds, on
141310 - the account descriptions will be sorted and duplicate lines will be
141311 - deleted. ref SDS 0 575G
141313 -      ..
141314 -     [On 030809 created complementary function F3 to capture subject
141315 -     account descriptions for replication with Shift F3. ref SDS 5 0001
141317 -      ..
141318 -     [On 040501 improved process of starting a new account by creating
141319 -     a structure that compliments the F5 function to replicate account
141320 -     structure to define multiple views. ref SDS 6 BM7S
141321 -
141322 -
141323 -
141325 -  ..
1414 -
1415 -
1416 - Evaluation and Use
1417 -
141701 - F5 has a dual personality in the Editor and in SDS records by turning
141702 - linking on and off, when a copy or move command is not pending.  This
141703 - feature is not needed in the SI, so today assigned F5 in the SI to
141704 - support the new alternate feature of conforming multiple lines for a
141705 - subject account to the top line in the list.  This executes when a
141706 - copy or move command is not pending, similar to linking in the editor
141707 - and SDS records.  There is a second part of this new F5 function.  If
141708 - F5 is pressed twice within a second or two, then the list is also
141709 - sorted and duplicate account description lines are deleted.  This was
141710 - added to complment using the new F3 function for appending closely
141711 - related structures into a single structure, with the result that
141712 - occassioally duplicate descriptions are assembled.  Now F5 makes
141713 - maintenance fast and easy.
141714 -
141715 -     [On 030809 created new function for F3 that captures account
141716 -     descriptions and Shift F3 that enters the descriptions at another
141717 -     locaton for cross-reference; replaces using cut and paste to save
141718 -     more keystrokes. ref SDS 5 8M7L
141720 -  ..
141721 - The typical scenario is that a subject structure is created in one
141722 - location that is needed in 4 or 5 other places.  Cut and paste is fast
141723 - and easy to move the structure to each location.  Up until today,
141724 - after this step of loading a subject account template, which may be 5
141725 - to 20 lines or so, then there is manual typing to use cut and past for
141726 - conforming the alignment of the narrative with the alignment in the
141727 - index, and further each of the lines typically requires separate
141728 - keystrokes to conform the account codes for all of the multiple lines.
141730 -  ..
141731 - F5 now does all of this with a single stroke.  Using it so far saves a
141732 - lot of time, mental concentration and energy, adding to the list of
141733 - improvements on 000824 for reducing keystrokes to save time and money
141734 - by integrating tasks. ref SDS 4 0001
141735 -
141736 -     [On 030809 created new function for F3 that captures account
141737 -     descriptions and Shift F3 that enters the descriptions at another
141738 -     locaton for cross-reference; replaces using cut and paste to save
141739 -     more keystrokes. ref SDS 5 8M7L
141741 -  ..
141742 - The code conforms the alignment of the narrative description to the
141743 - account structure above the current structure.  This eliminates any
141744 - necessity to use cut and paste to manipulate the initial structure
141745 - beyond brining in a template structure from another location.  All of
141746 - the account codes are then conformed.  This takes less than a second
141747 - and reduces chances of making a mistake.  The feature added to shear
141748 - off extra lines, ref SDS 0 TD4I, is particularly helpful in allowing
141749 - faster work by reducing the level of care in handling individual
141750 - lines.
141752 -  ..
141753 - A place where a mistake can occur is if there is not a space above and
141754 - below the account structure, which is the case in many of the older
141755 - indexes.  It is fast and easy to create a blank line above and below
141756 - each account structure, but it is also easy to forget, and this is
141757 - especially problematic when a function is very easy to use, like F5.
141758 - There is an error recognition in the case where there is not a blank
141759 - line above an account structure, but there are many situations where
141760 - different accounts are on consecutive lines, and so pressing F5 will
141761 - not set all of those consecutive lines to the same account.  If a
141762 - mistake does occur, seems to be fairly easy to recognize this and to
141763 - recover by closing the account without saving it.
141764 -
141765 -
141766 -
141767 -
141769 -  ..
1418 -
1419 -
1420 - Progress
1421 -
142101 - 050409  Subject Menu Add New Function to Align Account Code Format
142102 -
142103 - Line 130, ref OF 4 TO4I, -label subjQ in 050409 about 30 lines below
142104 -
142105 -     Remove assignment for F1 F4 so that we can use the regular
142106 -     assignment that supports doing a search in an index.
142108 -      ..
142109 -     Add new assignment for F1 F6, which formerly did something
142110 -     calling macro file 03506
142112 -      ..
142113 -     Align Account..................F1 F6
142114 -
142116 -  ..
142117 - 03501  SI Main Profile Change Assignment for F1 F6
142118 -
142119 - Line 2150, ref OF 1 BG5J, -label bHpf082 in 03501 about 60 lines
142120 - below
142121 -
142122 -     pf6 @c:\sd\03\03507
142123 -
142124 -        Changed this assignment from 03506, which is no longer needed.
142126 -         ..
142127 -        Actually, only considered this assignment.  It will work better
142128 -        assigning 03507 to F5 as an alternate when there is not a copy
142129 -        or move op pending which requires a target command. ref SDS 0
142130 -        M79I
142131 -
142132 -
142134 -  ..
142135 - 000007  F5 Target for Copy Linking and Update SI Account Structure
142136 -
142137 - Today, will add to macro 122 a call when 47 = 31 that F5 will execute
142138 - 03507 if a move or copy command is not pending.
142139 -
142140 -     [On 030809 created new function for F3 that captures account
142141 -     descriptions and Shift F3 that enters the descriptions at another
142142 -     locaton for cross-reference. ref SDS 5 8M7L
142144 -  ..
142145 - Line 3000, ref OF 6 ET5I, -entry 122 in 000007
142146 -
142147 -    -entry 122
142148 -
142149 -        Macro 122 is called by F5.  If a copy or move command is
142150 -        pending, then F5 executes a target command, otherwise it calls
142151 -        code that marks the current location for linking.
142152 -
142154 -  ..
142155 - Line 3010, ref OF 6 IW6N, -label mflkng 000007
142156 -
142157 -    -if @47 != 31 -goto nSI31
142158 -    @c:\sd\03\03507
142159 -    -exit
142160 -
142161 -        Added code to call new macro 03507 that formats an account code
142162 -        structure. ref SDS 0 M79I
142163 -
142164 -
142166 -  ..
142167 - 03507  New Function in SI to Align All Lines in an Account
142168 -
142169 - This is assigned to primary profile F5 in SI only and runs when a copy
142170 - or move command is not pending.
142172 -  ..
142173 - We have been doing a lot of work lately replicating account structures
142174 - with cut and paste at different levels.  This typically entails
142175 - changing the account structure slightely.  Where there a lof of lines
142176 - this is a lot of repetitious key strokes.  The new macro 03507 tries
142177 - to reduce this to a single key stroke.
142179 -  ..
142180 - Line 30, ref OF 3 MV3L, in 03507
142181 -
142182 -    macro 22
142183 -    of 0
142184 -    immed /
142185 -
142186 -        Save initial condition that can be restored when the thing
142187 -        ends.
142189 -     ..
142190 -    loc_cur 3 1
142191 -    errorcnt 0 0
142192 -    z 2 2
142193 -    l-/ /
142194 -
142195 -        Find the top of the block.  This code requires that subject
142196 -        account structures be separated by a blank line.  The new
142197 -        structures are separated, but not most of the old structures.
142199 -         ..
142200 -        This may wind up presenting a big problem.
142202 -         ..
142203 -        Zone z 2 2 so we can use same zone to look for colon in the
142204 -        account above the structure being processed in order to
142205 -        conform to a uniform alignment of account descriptions.
142206 -
142208 -  ..
142209 - Line 60, ref OF 3 Z07M, -label okay1 in 03507
142210 -
142211 -    -if @0 = 0 -goto okay1
142212 -    beep
142213 -    errormsg  Need blank line above and below account lines
142214 -    -goto end
142215 -    -label okay1
142216 -
142217 -        If a blank line is found, then we are okay to proceed, and if
142218 -        not then end the thing and give an error message this code
142219 -        needs a blank line at the top of the account structure to
142220 -        function.
142221 -
142222 -
142224 -  ..
142225 - Line 80, ref OF 3 O39L, -label okay1 in 03507
142226 -
142227 -    up
142228 -    macro 14
142229 -    l-/:/
142230 -    -if @0 = 0 -goto okay2
142231 -    beep
142232 -    errormsg  Need account above target structure for format
142233 -    -goto end
142234 -
142235 -        Code found a blank line so scroll up to place the top of the
142236 -        account structure to be processed at the top of the file where
142237 -        processing will occur; mark the location with macro 14, so we
142238 -        can come back after getting the offset to align the narrative.
142239 -        We have already set the zone for the colon in column 2, per
142240 -        above, ref SDS 0 WN58, so do a reverse search to find the
142241 -        bottom of the account above the current structure.  We have to
142242 -        do a search because there may be some narrative seperating the
142243 -        accounts.  If we find a colon, then proceed, and if not end
142244 -        processing with an error message to correct the structure of
142245 -        the account.
142246 -
142247 -
142249 -  ..
142250 - Line 100, ref OF 3 F85F, -label okay2 in 03507
142251 -
142252 -
142253 -    z 1 80
142254 -    fr /. /
142255 -    setcur 71 0
142256 -    subcnt 71 1
142257 -
142258 -        The code above has placed the bottom line of the account above
142259 -        the target structure at the top of the file; find right a dot
142260 -        space fr /. / puts the cursor on the column of the narrative
142261 -        description.  Capture the location in counter 71 and subtract
142262 -        to get a value we can use for the next step. ref SDS 0 JS6O
142263 -
142265 -  ..
142266 - Line 110, ref OF 3 8H5L, -label okay2 in 03507 about 20 lines below
142267 -
142268 -    macro 15
142269 -    setcnt 87 46
142270 -    macro 1188
142271 -
142272 -        macro 15 restores the cursor to the top of the account
142273 -        structure being processed using the mark set above. ref SDS 0
142274 -        O54O  Read the entire account string on the top line to conform
142275 -        all other lines.  This means this top line must be correct.
142276 -        Set a flag to stop reading the string on a dot, since the
142277 -        format for SI is that account codes end in a dot.  Use the long
142278 -        string macro to read the account structure.
142280 -         ..
142281 -        Sometimes this is not the case, but it should still be fast and
142282 -        easy to adjust the structure based on separating the lines with
142283 -        a space.
142284 -
142286 -  ..
142287 - Line 120, ref OF 3 PPYU, -label okay2 in 03507 about 30 lines below
142288 -
142289 -    savescr 8
142290 -    errorcnt 0 0
142291 -    fr /.*./
142292 -
142293 -        Save the cursor location at the end of the account code, and
142294 -        look for a star on the line of dots leading to the description,
142295 -        in order to to apply this condition on every line.  If one is
142296 -        not there and it is needed, it can be added on a second pass.
142297 -        It can also just as easily be removed since this code runs very
142298 -        fast.
142299 -
142301 -  ..
142302 - Line 120, ref OF 3 PQPV, -label okay2 in 03507 about 40 lines below
142303 -
142304 -    setcnt 74 0
142305 -    -if @0 > 0 -goto lp2
142306 -    setcur 74 0
142307 -    subcnt 74 2
142308 -    getscr 8
142309 -
142310 -        Reset counter for saving location of a star, if it is there,
142311 -        and then search for a star *  If the search returns an error,
142312 -        then jump ahead to next step; but if there is a star then
142313 -        capture the location in counter 74 and adjust the column for
142314 -        entering the star in the other lines for the account, and then
142315 -        restore the cursor the end of the account string ready for the
142316 -        next step.
142317 -
142318 -
142320 -  ..
142321 - Line 120, ref OF 3 PQQX, -label lp2 in 03507
142322 -
142323 -    -label lp2
142324 -    aw
142325 -    split
142326 -    getscr 8
142327 -    split
142328 -    rel_cur 1 0
142329 -    immed d
142330 -    rel_cur -1 0
142331 -
142332 -        The cursor is at the end of the account string and on the first
142333 -        dot of the row of dots that leads to the account description.
142334 -        We want to remove the row of dots and save the description to
142335 -        restore it on the same column as the template account above the
142336 -        current structure.  aw command jumps to the narrative; split
142337 -        the narrative, then call getscr 8 to move the cursor back to
142338 -        the end of the account string and on the first dot again, then
142339 -        do another split to separate the row of dots.  Move the cursor
142340 -        down and delete that line since it is now by itself on a line,
142341 -        then move the cursor back to the initial line.
142342 -
142344 -  ..
142345 - Line 150, ref OF 3 PQSP, -label lpdt in 03507
142346 -
142347 -    -label lpdt
142348 -    ic 46
142349 -    setcur 72 0
142350 -    -if @74 > 0 -if @74 = @72 ic 42
142351 -    -if @72 < @71 -goto lpdt
142352 -
142353 -        Do a loop that enters a string of dots until the cursor reaches
142354 -        the location of the description structure determined by counter
142355 -        71, per above. ref SDS 0 U97S  If counter 74 is greater than 0,
142356 -        then check to see the column for entering a star, and enter the
142357 -        star at that location, per above. ref SDS 0 WN56
142358 -
142359 -
142361 -  ..
142362 - Line 160, ref OF 3 M77K, -label deLn in 03507
142363 -
142364 -    join
142365 -    loc_cur 0 1
142366 -    up
142367 -    -label deLn
142368 -    chrcnt 1 0
142369 -    -if @1 = 32 -goto cute
142370 -    setlen 1 0
142371 -    -if @1 > @71 -goto nxLn
142373 -     ..
142374 -    immed d
142375 -    -goto deLn
142376 -
142377 -        Do a loop to shear off any extra lines that do not have a
142378 -        description.  This allows the user to simply add plenty of
142379 -        lines to enter a set of descriptions, and then a single key
142380 -        updates everything, including removing the extra lines, rather
142381 -        than have to perform several different clean up ops that each
142382 -        involve multiple key strokes.  When all the extra lines are
142383 -        delete, goto cute to remove any blank lines to end of file, so
142384 -        that one key stroke does all the clean up. ref SDS 0 3Y3H
142385 -        After entering the row of dots to the correct column for the
142386 -        account description and joining the line with the description.
142387 -        Scroll up to the next line.  If the position in column 1 on the
142388 -        next line is a space, then the operation is over, so go to end.
142389 -        ref SDS 0 575G  If the position in column 1 is not blank, then
142390 -        start the cycle over by doing next step...
142391 -
142393 -  ..
142394 - Line 190, ref OF 3 PQTQ, -label nxLn in 03507
142395 -
142396 -    -label nxLn
142397 -    setcnt 0 @241
142398 -    setcnt 241 7537
142399 -    macro 1189
142400 -    setcnt 241 @0
142401 -    setcnt 0 0
142402 -    -goto lp2
142403 -
142404 -        Set a flag 241 7537 for a conditional in macro 1189.  Call
142405 -        macro 1189 that enters a long string and uses the control set
142406 -        for 241 7537 to avoid calling macro 641 that would normally
142407 -        delete everything else on the line.  We need everything else to
142408 -        stay in this application. After macro 1189 enters the account
142409 -        string previously captured, per above, ref SDS 0 WN8R, then
142410 -        restore the original value of 241 from counter 0 and reset 0 0,
142411 -        Then return to start loop again to complete processing for the
142412 -        new line. ref SDS 0 IN4K  We do not need to enter savescr 8
142413 -        again, because that was already done, per above. ref SDS 0 WN40
142414 -        This code will conform every line in the account to the same
142415 -        string and structure.
142416 -
142418 -  ..
142419 - Line 230, ref OF 3 3V5L, in 03507 -label cute
142420 -
142421 -    -label cute
142422 -    rel_cur 1 0
142423 -    setlen 1 0
142424 -    rel_cur -1 0
142425 -    -if @1 != 0 -goto end
142426 -    immed d
142427 -    -goto cute
142428 -
142429 -        After removing extra account lines that are not needed, per
142430 -        above, ref SDS 0 W38M, remove all the blank lines to the next
142431 -        account or to end of file and leave one blank.
142432 -
142433 -
142434 -
1425 -

SUBJECTS
2 Clicks F5 Twice Alphabetize List of Subjects and Remove Duplicates

1503 -
150401 -  ..
150402 - F5 Alphabetical Sort and Remove Duplicate Subjects Pressed Twice
150403 - Alphabetical Sort and Remove Duplicate Subjects F5 Pressed Twice
150404 - Sort Descriptions and Delete Duplicates on 2nd Pass Pressing F8
150405 -
150406 - Follow up ref SDS 3 EZ6N.
150407 -
150408 -    Develop method to sort and remove duplicates that get created by
150409 -    combining organic structures.  Not sure if sorting is terribly
150410 -    effective, because sometimes we want to force an order.  Will have
150411 -    to see how this works out.  Will try sort macro 1452 developed on
150412 -    931102. ref SDS 1 6462  Actually the sort macro didn't work out,
150413 -    but used the code as a template to develop new code in 03507, and
150414 -    was able to streamline for SI ops. ref SDS 0 VW6F   Added a timing
150415 -    switch similar to double clicking discussed in the record on
150416 -    000821, ref SDS 3 EZ6N, so that if F5 is pressed twice within a
150417 -    second, then the code will sort and remove duplicates.  This gives
150418 -    the User the option on whether to sort or not to sort a particular
150419 -    account.
150420 -
150421 -
150423 -  ..
150424 - F5 F5 Alphabetize Delete Duplicates
150425 - Timing Switch Doubles Performance of Subject Index Profile
150426 -
150427 - Line 240, ref OF 3 DJ5H, in 03507 -label maint
150428 -
150429 -    -label maint
150430 -    datecnt 4 0
150431 -
150432 -        The first step is to determine if the user has pressed F5 once
150433 -        or twice within a second.  Pressing F5 twice within a second,
150434 -        calls a second feature of sorting and deleting any duplicate
150435 -        subjec descriptions.
150437 -         ..
150438 -        This draws on code in 000001 developed to manage double clicks
150439 -        for the mouse using macro 230, ref OF 5 RQ8J, and discussed in
150440 -        the record on 000821. ref SDS 3 EZ6N
150441 -
150442 -
150443 -
150445 -  ..
150446 - Line 280, ref OF 3 N77M, in 03507 -label 2Clks
150447 -
150448 -    -label 2Clks
150449 -    macro 15
150450 -    z @83 150
150451 -    errorcnt 0 0
150452 -
150453 -        The code has passed the 2 clicks test, per above. ref SDS 0
150454 -        VW6F  This means the user wants to sort and delete duplicates.
150455 -        Return to the top of the account.  Set the zone to start at the
150456 -        left margin of the description field, and set errorcnt to work
150457 -        with zonereps and repscnt for sorting the list of descriptions.
150458 -
150460 -  ..
150461 - Line 300, ref OF 3 WE9J, -label lp4e in 03507
150462 -
150463 -    -label lp4e
150464 -    zonereps
150465 -    up
150466 -
150467 -        Capture the string on the current line for the zone, then
150468 -        scroll up to test the next line.  The code for this section is
150469 -        based on the sort op developed for macro 1452 in 000008 line
150470 -        3030. ref OF 7 WV3N
150472 -     ..
150473 -    -label lp4f
150474 -    chrcnt 3 0
150475 -    -if @3 = 32 -goto en3d
150476 -
150477 -        Read the char and if it is a space, then end the operation,
150478 -        because this is the bottom of the list.
150480 -     ..
150481 -    repscnt 1 0
150482 -    -if @1 > 0 -goto lp4e
150483 -    -if @1 = 0 -goto dlDup
150484 -
150485 -        It is not the bottom of the list, so run repscnt 1 0, and if
150486 -        the current line has a greater repscnt value than the line
150487 -        above, then return to loop for checking the next line, goto
150488 -        lp4e, ref SDS 0 H85H  If the current line does not have a
150489 -        greater repscnt value, then if the the two lines are same,
150490 -        i.e., identical, then go do a routine to delete the current
150491 -        line. -goto dlDup, ref SDS 0 WH3I
150492 -
150493 -
150495 -  ..
150496 - Line 310, ref OF 3 EF3F, -label lp4f in 03507
150497 -
150498 -    immed m
150499 -    zonereps
150500 -    down
150501 -
150502 -        This means the current line has a higher sort value than the
150503 -        target line where zonereps was entered, so begin a move down
150504 -        op, capture the sort value of this line with zonereps and begin
150505 -        scrolling down to put this line above a line that has a lower
150506 -        sort value.  Do an initial down to avoid evaluating the target
150507 -        line.
150509 -     ..
150510 -    -label lp2q1
150511 -    down
150512 -    chrcnt 2 0
150513 -    -if @2 = 32 -goto ltst7
150514 -    repscnt 1 0
150515 -    -if @1 >= 0 -goto lp2q1
150516 -
150517 -        Down loop looking for string that sorts higher than line just
150518 -        captured.  If a space is encountered, this is the top of the
150519 -        list, so go do a target to complete move command. -goto lst7,
150520 -        ref SDS 0 645L  If the current line is greater than or equal to
150521 -        the line captured with zonereps, then return to the top of this
150522 -        nested loop that is scrolling down, -goto lp2q1. ref SDS 0 WG4H
150523 -
150525 -  ..
150526 - Line 340, ref OF 3 685I, -label ltst7 in 03507
150527 -
150528 -    -label ltst7
150529 -    immed t
150530 -    up
150531 -    -goto lp4e
150532 -
150533 -        This is a line that sorts higher than the line captured with
150534 -        repscnt, so execute a target to move the repscnt line, and then
150535 -        scroll up to prepare for returning to primary loop that scrolls
150536 -        up -goto lp4e. ref SDS 0 H85H
150537 -
150538 -
150540 -  ..
150541 - Line 360, ref OF 3 IG6J, -label dlDup in 03507
150542 -
150543 -    -label dlDup
150544 -    immed d
150545 -    -goto lp4f
150546 -
150547 -        The lines are equal so they are a duplicate.  This code deletes
150548 -        duplicate subject descriptions, and then returns to major loop
150549 -        to continue. -goto lp4f, ref SDS 0 P96H
150550 -
150551 -
150553 -  ..
150554 - Line 240, ref OF 3 PY6L, in 03507 -label end
150555 -
150556 -    macro 23
150557 -    of 0
150558 -    purge c:\sd\03\03507
150559 -
150560 -        Restore the original condition, except return to of 0, so the
150561 -        user has a full orientation showing the new structure.  Then
150562 -        purge the processor.
150563 -
150564 -
150565 -
150566 -
150567 -
150568 -
150569 -
150570 -
150571 -
1506 -