Welch Company
San Francisco, CA


S U M M A R Y


DIARY: May 11, 2011 07:53 AM Wednesday; Rod Welch

SDS java data base pointers make compile code macro files 001 0011.

1...Summary/Objective
2...SDS Java 64-bit Compiled Code Slower than SDS 16-bit Macro Files
3...Data Base SDS Java 64-bit Compile Code Increase Processing Speed
4...SDS Pointer Data Base Macro 1472 in 000010 Construct List All Users
5...Sort Processor Initial Setup All Data Base Types Empty Current Files
6...Setup Main Process Loop and End Process After Loop Completes
7...Main Loop Process All Users All Weekly Data Base Files
8...Directory Levels Assign Each Data Base Type Subroutine
9...Setup Directory Lists Process Data Bases Each User All Years
10...Sort Control File Docs0 Configure Construct Each Data Base Type
11...References Files Sort Control File Docs0 Construct Data Base
12...Contacts Sort Control File Docs0 Construct Data Base
13...Correspondence Sort Control File Docs0 Construct Data Base


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

CONTACTS 

SUBJECTS
Data Base Global Pointers Extremely Slow Macro Files 001 and 0011 Ca

3203 -
3203 -    ..
3204 - Summary/Objective
3205 -
320501 - Follow up ref SDS 4 QK4N.
320502 -
320503 - Created new compiled macro 4020 in new macro development file 000012
320504 - for updating each day SDS data base pointer files, ref SDS 0 II7K, and
320505 - with the aim of increasing speed of performance launching SDS the
320506 - first time each day. ref SDS 0 DV5H
320507 -
320508 -
320509 -
320510 -
320512 -  ..
3206 -
3207 -
3208 - Evaluation
3209 -
320901 - SDS Java 64-bit Compiled Code Slower than SDS 16-bit Macro Files
320902 -
320903 - Follow up ref SDS 3 595H, ref SDS 2 IB9L.
320904 -
320905 - Compiled macro 5020 created today, per below, ref SDS 0 II7K, runs
320906 - once per day to assemble SDS data base pointer files called by macro
320907 - file 04702 to launch SDS, and after the code performs an interim
320908 - backup of SDS records and work work files which takes about 80
320909 - seconds.  This new compiled macro 4702 code scheme performs all steps
320910 - in original SDS also called in macro file 04702 using following
320911 - tools...
320913 -                       ..
320914 -                      c: sd 01 25a.cmd
320915 -                      c: sd 33 001
320916 -                      c: sd 33 0011
320918 -  ..
320919 - On the first pass compiled processing SDS data base pointers seems
320920 - about as fast for SDS java in 64-bit mode, as original SDS in 16-bit
320921 - assembly running in Windows 7 32-bit mode.
320922 -                                                           Seconds
320923 -            SDS 16-bit 32-bit mode using macro files........ 120
320924 -            SDS java 64-bit using compiled code............. 120
320926 -  ..
320927 - After the first pass calling compiled macro 5020 to update the data
320928 - base when needed during the work day...
320929 -
320930 -            SDS 16-bit 32-bit mode using macro files........  5
320931 -            SDS java 64-bit using compiled code............. 13
320932 -
320933 -
320934 -
320935 -
320937 -  ..
3210 -
3211 -
3212 - Progress
3213 -
321301 - Data Base SDS Java 64-bit Compile Code Increase Processing Speed
321302 -
321303 - SDS records construct a diary data base for daily communications and
321304 - reporting on work performed.  The design strives to provide command
321305 - and control with granular access to specific information, and for
321306 - assembling chronologies that show trends.  SDS "reports" system
321307 - enables people to use the data base.  The reports system uses
321308 - "pointer" sub-data-bases to increase the speed assembling reports.
321310 -  ..
321311 - SDS pointer data bases support reports...
321312 -
321313 -        d: sd 08 uuuuu 01..................... Control Fields
321314 -        d: sd 08 uuuuu 03..................... Reference Files
321315 -        d: sd 08 uuuuu 04..................... Correspondence & Publications
321316 -        d: sd 08 uuuuu 05..................... Contacts
321318 -  ..
321319 - Records for each data base type are stored in files by...
321320 -
321321 -        d: sd 08 uuuuu 01 YY WW............... Control Fields
321323 -  ..
321324 - Files are constructed daily from saving SDS records with F2 calling
321325 - macro 4030 assigned in...
321327 -  ..
321328 - Line 2750, ref OF 3 RM9G, -entry 1557 in sd 33 000008 about 90 lines below
321329 -
321330 -    pf2 macro 142
321332 -  ..
321333 - Line 50, ref OF 4 LU5I, -entry 142 in sd 33 000010
321334 -
321335 -    -entry 142
321336 -
321337 -        save SDS records
321338 -
321340 -  ..
321341 - Line 50, ref OF 4 LU5I, -entry 142 in sd 33 000010
321342 -
321344 -  ..
321345 - Line 2340, ref OF 4 XQ4O, -label ppntrs in sd 33 000010
321346 -
321347 -    -label ppntrs
321348 -
321349 -        This begins code that constructs SDS data base pointers files
321350 -        with 7 days of records.
321352 -  ..
321353 - Weekly files are assembled into a single data base file for each type
321354 - of data base and stored in....
321355 -
321356 -        e: sd 08 000000 06 00001.............. subjects
321357 -        e: sd 08 000000 06 00003.............. files
321358 -        e: sd 08 000000 06 00004.............. correspondence
321359 -        e: sd 08 000000 06 00005.............. contacts
321361 -  ..
321362 - These composite data base pointer files are constructed by 04702 that
321363 - launches SDS each day,   If needed, they can be constructed during the
321364 - course of the day with a function in the Schedule.
321366 -  ..
321367 - Had difficulty getting code for SDS java to run code called in 04702
321368 - for original SDS, that applies 25a.cmd to call 01 14 001 and 0011.
321369 - Eventually got the code to run by calling 001 and 0011 directly in
321370 - 04702, instead of in 25a.cmd.
321372 -  ..
321373 - After getting the code to run, it is much slower constructing the
321374 - pointer data base files than doing the same task in original SDS.
321376 -  ..
321377 - On 110509 Morris suggested making macro files 001 and 0011 compiled
321378 - code in order to increase speed assembling SDS data base global
321379 - pointers. ref SDS 4 QK4N
321381 -  ..
321382 - Work today initially created macro 1427 appended below macro 142 in
321383 - development file 000010, and to avoid confusion from proliferating
321384 - development files.  Since the code for the work today was entered
321385 - below -entry 142, selected name of -entry 1427, due to momentary
321386 - confusion that the code was somehow related to -entry 142.  Later on
321387 - 110525, assignment to -entry 1427 was confusing, because the scope is
321388 - unrelated to saving records.  Therefore, to avoid confusion tried a
321389 - new scheme.  Decided to keep development file 000010 dedicated to
321390 - saving records, and so tried changing the name to -entry 5020 in a new
321391 - development file 000012.  Netbeans then returned error message saying
321392 - -entry 5020 is already assigned, so changed the name to 4020.
321394 -  ..
321395 - Entered in record on pending issues question of "hidden" macro
321396 - assignments in SDS java code, reported on 110509 1047. ref SDS 4 QZ7O
321398 -             ..
321399 -            [On 110525 0538 discover Netbeans reports -entry 5020
321400 -            duplicates existing assignement, so changed name to -entry
321401 -            4020. ref SDS 6 GU9M
321403 -  ..
321404 - As a result, incorporated code for updating SDS data base global
321405 - pointers in new macro 4020 as follows...
321407 -  ..
321408 - Line 3420, ref OF 1 7650, -label dun9 in 01 14 04702 about 80 lines below
321409 -
321410 -    macro 4020
321411 -
321412 -        This new compiled macro is developed below in a new macro
321413 -        development file 000012; it significantly streamlines code
321414 -        in...
321416 -                       ..
321417 -                      C: SD 01 25a.cmd
321418 -                      C: 01 04 0010
321419 -                      C: 01 04 00110
321421 -  ..
321422 - The same code is called in the diary menu for the Schedule, so that
321423 - interim updates can be constructed if needed...
321425 -  ..
321426 - Line 280, ref OF 2 6X9G, -label m96gG in 01 14 0504060
321427 -
321428 -    macro 4020
321429 -
321431 -  ..
321432 - SDS Pointer Data Base Macro 1472 in 000010 Construct List All Users
321433 - Sort Processor Initial Setup All Data Base Types Empty Current Files
321434 -
321435 - Line 1, ref OF 5 LM8N, -entry 4020 in sd 33 000012
321436 -
321437 -    -entry 4020
321438 -    markcur 50
321439 -    dos cmd.exe /c md \kq
321440 -    dos cmd.exe /c dir d:\sd\08 > dirx
321441 -    e W57W
321442 -    macro 301
321443 -    ins_text "dos cmd.exe /c c:\sd\31\o docs0 e:\sd\08\00000\06\00001 docs1"
321444 -    e dirx
321445 -    savx e:\sd\08\00000\06\fun
321446 -    dos cmd.exe /c del /q e:\sd\08\00000\06
321447 -
321448 -        markcur 50 provides generic return to start file for calling
321449 -        macro 4702 from both program launch op, macro 04702, per above,
321450 -        ref SDS 0 UF3L, and also in the Schedule menu for Diary, per
321451 -        above, ref SDS 0 4O5N -- make temp dir kq and use Microsoft dir
321452 -        command to get a list of users on the current computer and
321453 -        store in file dirx for processing.  W557W configure temporary
321454 -        macro for dos call to apply Opt Tech sort o.exe that sorts the
321455 -        data base based on control file.  savx ensures the target
321456 -        directory is constructed, del command clears existing data
321457 -        base.
321458 -
321459 -            [On 110524 0543 added code to calculate total time required
321460 -            for launching SDS for 1st time each day that performs daily
321461 -            backup and updates data base pointers. ref SDS 5 6K8H
321462 -
321464 -  ..
321465 - Setup Main Process Loop and End Process After Loop Completes
321466 -
321467 - Line 3560, ref OF 5 5S8H, -entry 4702 in sd 33 000012
321468 -
321469 -    setgbl 373 1
321470 -    setgbl 374 0
321471 -    -gosub lpa
321472 -    setgbl 373 2
321473 -    setgbl 374 0
321474 -    -gosub lpa
321475 -    setgbl 373 4
321476 -    setgbl 374 0
321477 -    -gosub lpa................................ ref SDS 0 PP9Q
321478 -    ecur 50
321479 -    dos cmd.exe /c del dirx* > nul
321480 -    dos cmd.exe /c del docs* > nul
321481 -    dos cmd.exe /c rd /s/q \kq
321482 -    purge W55W
321483 -    purge W56W
321484 -    purge W57W
321485 -    purge docs1
321486 -    purge dirx
321487 -    purge dirxx
321488 -    -exit
321489 -
321490 -        setgbl 373 1 and 374 0 control processing for subject control
321491 -        field data base files... -gosub lpa is a common processor for
321492 -        all 4 data base types. setgbl 373 2 setgbl 374 0 processes
321493 -        Reference field files.
321494 -
321495 -
321497 -  ..
321498 - Main Loop Process All Users All Weekly Data Base Files
321499 -
321500 - Line 3600, ref OF 5 TK4G, -label lpa in sd 33 000012
321501 -
321502 -    -label lpa
321503 -    -gosub setup................................ ref SDS 0 UG6G
321504 -     ..
321505 -    -label lp1a2
321506 -    up
321507 -    -if @0 > 0 -goto lpaS...................... ref SDS 0 BX4F
321508 -    chrcnt 1 0
321509 -    -if @1 = 32 -goto lpaS..................... ref SDS 0 BX4F
321510 -    macro 1182
321511 -    e W56W
321512 -    addcnt 444 1
321513 -    -if @444 > 1 -goto sk1301....................... ref SDS 0 UG6I
321514 -    macro 301
321515 -    ins_text !dos cmd /c dir d:\sd\08\UUUUU\01 > dirxx!
321516 -    setcnt 86 1
321517 -     ..
321518 -    -label sk1301
321519 -    loc_cur 3 25
321520 -    macro 1181
321521 -    getgbl 374 374
321522 -    -if @374 >= 373 -goto dbtas........................ ref SDS 0 UG7G
321523 -    loc_cur 0 32
321524 -    -gosub pdbtdl
321525 -     ..
321526 -    -label dbtas
321527 -    e W55W
321528 -    addcnt 445 1
321529 -    -if @445 > 1 -goto sk2301...................... ref SDS 0 BW6J
321530 -    macro 301
321531 -    ins_text !dos cmd /c copy d:\sd\08\UUUUU\01\yy\* /a \kq\UUUUUyy > nul!
321532 -    setcnt 86 1
321533 -     ..
321534 -    -label sk2301
321535 -    loc_cur 3 26
321536 -    macro 1181
321537 -    loc_cur 3 47
321538 -    macro 1181
321539 -    getgbl 374 374
321540 -    addcnt 374 1
321541 -    setgbl 374 @374
321542 -    -if @374 > 374 -goto odbas2...................... ref SDS 0 UG9F
321543 -    loc_cur 0 33
321544 -    -gosub pdbtdl.................................... ref SDS 0 UG4N
321545 -     ..
321546 -    -label odbas2
321547 -    purge dirxx
321548 -    @W56W
321549 -    e dirxx
321550 -    -gosub setup.................................... ref SDS 0 UG4N
321551 -    -if @0 > 0 -goto lpaSs.......................... ref SDS 0 UG4M
321552 -     ..
321553 -    -label lpbz
321554 -    up
321555 -    chrcnt 1 0
321556 -    -if @1 = 32 -goto lpaSs........................ ref SDS 0 UG4M
321557 -    macro 1182
321558 -    e W55W
321559 -    loc_cur 3 35
321560 -    macro 1181
321561 -    loc_cur 3 52
321562 -    macro 1181
321563 -    e dirxx
321564 -    @W55W
321565 -    loc_cur 0 @11
321566 -    -goto lpbz
321567 -     ..
321568 -    -label lpaSs
321569 -    e dirx
321570 -    purge dirxx
321571 -    loc_cur 0 @11
321572 -    -goto lp1a2............................. ref SDS 0 UG4O
321573 -
321574 -
321575 -
321577 -  ..
321578 - Directory Levels Assign Each Data Base Type Subroutine
321579 -
321580 - Line 3760, ref OF 5 3L64, -label pdbtdl in sd 33 000012
321581 -
321582 -    -label pdbtdl
321583 -    getgbl 373 373
321584 -    -if @373 = 1 ic 49
321585 -    -if @373 = 2 ic 51
321586 -    -if @373 = 3 ic 52
321587 -    -if @373 = 4 ic 53
321588 -    setgbl 374 373
321589 -    -return
321590 -
321591 -        Subroutine Post data base directory for each type of data
321592 -        base.
321593 -
321594 -
321596 -  ..
321597 - Setup Directory Lists Process Data Bases Each User All Years
321598 -
321599 - Line 3780, ref OF 5 CX8H, -label setup in sd 33 000012
321600 -
321601 -    -label setup
321602 -    top
321603 -    z 1 80
321604 -    errorcnt 0 0
321605 -    l /../
321606 -    -if @0 > 0 -return
321607 -    loc_cur 0 80
321608 -    fl /../
321609 -    setcnt 86 1
321610 -    setcur 11 0
321611 -    addcnt 11 1
321612 -    setcnt 12 @11
321613 -    addcnt 12 7
321614 -    -return
321615 -
321616 -        Set up directory listings for users and years for each user.
321617 -
321619 -  ..
321620 - Sort Control File Docs0 Configure Construct Each Data Base Type
321621 -
321622 - Line 3820, ref OF 5 3X54, -label lpaS in sd 33 000012
321623 -
321624 -    -label lpaS
321625 -    e docs1
321626 -    macro 301
321627 -    getgbl 373 373
321628 -    -if @373 = 4 -goto cntcts..................... ref SDS 0 BX9L
321629 -    -if @373 = 2 -goto rscf....................... ref SDS 0 X66M
321630 -    immed a
321631 -    ins_text !s(75,40,c,a,15,5,c,a,1,13,c,a)!
321632 -    rel_cur 1 0
321633 -    ins_text !in(28,4,c,eq,"K101")!
321634 -    -goto wscfd.................................. ref SDS 0 547G
321635 -
321636 -        After all weekly data base files have been assembled into
321637 -        single file docs0, then construct docs1 for an Opt Tech Sort
321638 -        control file to create global pointers for Control Field lines
321639 -        to search for functions and subjects.
321640 -
321641 -
321643 -  ..
321644 - References Files Sort Control File Docs0 Construct Data Base
321645 -
321646 - Line 3880, ref OF 5 NH4I, -label rcsf in sd 33 000012
321647 -
321648 -    -label rscf
321649 -    immed a
321650 -    ins_text /s(1,22,c,a,35 27,c,a)/
321651 -    rel_cur 1 0
321652 -    ins_text /dupo(B5000,1,22,35,27)/
321653 -     ..
321654 -    -label wscfd
321655 -    dos cmd.exe /c copy \kq\* /a docs0 > nul
321656 -     ..
321657 -    -label sfcf04
321658 -    save docs1
321659 -    e W57W
321660 -    loc_cur 3 55
321661 -    -gosub pdbtdl............................ ref SDS 0 UG4N
321662 -    -goto asgp3.............................. ref SDS 0 BX4G
321663 -
321665 -  ..
321666 - Contacts Sort Control File Docs0 Construct Data Base
321667 -
321668 - Line 3890, ref OF 5 LW6G, -label cntcts sd 33 000012
321669 -
321670 -    -label cntcts
321671 -    e W57W
321672 -    macro 301
321673 -    ins_text !dos cmd.exe /c copy \kq\* /a e:\sd\08\00000\06\00005 > nul!
321674 -     ..
321675 -    -label asgp3
321676 -    @W57W
321677 -    dos cmd.exe /c del /q \kq
321678 -    setcnt 0 0
321679 -    getgbl 373 373
321680 -    -if @373 = 2 -goto 373t4......................... ref SDS 0 KW5M
321681 -    e dirx
321682 -    -return
321683 -
321684 -        Ends main processing loop lpa.............. ref SDS 0 PP9Q
321685 -
321687 -  ..
321688 - Correspondence Sort Control File Docs0 Construct Data Base
321689 -
321690 - Line 3950, ref OF 5 5W6H, -label 373t4 sd 33 000012
321691 -
321692 -    -label 373t4
321693 -    setgbl 373 3
321694 -    e docs1
321695 -    macro 301
321696 -    immed 2a
321697 -    ins_text /s(1,28,c,a)/
321698 -    rel_cur 1 0
321699 -    ins_text /in((62,1,c,eq,"R",or,62,1,c,eq,"I"), /
321700 -    rel_cur 1 0
321701 -    ins_text /or,(35,11,c,eq,"02 14 01 60",and,270,1,c,ge,"0",and,270,1,c,le,"z"))/
321702 -    -goto sfcf04............................... ref SDS 0 X688
321703 -
321704 -
321705 -
321706 -
321707 -
321708 -
321709 -
321710 -
321711 -
321712 -
321713 -
321714 -
321715 -
321716 -
3218 -



















1717 - 321718 - 3218 -