--- title: "Insurance Property Record" id: 55066 type: "computer_media" slug: "insurance-property-record" url: "http://localhost/computer_media/insurance-property-record/" markdown_url: "http://localhost/computer_media/insurance-property-record.md" published_at: "2024-06-14T01:24:05+00:00" modified_at: "2026-03-31T12:44:47+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/06/SCR-20260331-icxz.png" excerpt: "A full home insurance property inventory system that catalogs up to 100 items, supports multi-criteria search, and saves everything back to tape for safekeeping." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "Timeworks" slug: "timeworks" taxonomy: "post_tag" url: "http://localhost/tag/timeworks/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" genre: - name: "Home" slug: "home" taxonomy: "genre" url: "http://localhost/type/home/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/Insurance%20Property%20Record%20%281982%29%28Timeworks%29%28TS2068%29%28US%29%28Program%29.zip" mediadate: "1982" producer_company: - id: 11400 title: "Timeworks, Inc." type: "company" url: "http://localhost/company/timeworks/" images: - url: "http://localhost/wp-content/uploads/2024/06/SCR-20260331-icxz.png" - url: "http://localhost/wp-content/uploads/2024/06/SCR-20260331-icwx.png" related_products: - id: 14334 title: "Insurance Property Record, The" type: "product" url: "http://localhost/product/insurance-property-record/" media_type_tags: "Home" --- # Insurance Property Record This program is a home insurance property inventory system that allows users to catalog up to 100 household items with descriptions, purchase costs, dates, store codes, and location codes. It also stores general insurance policy information such as policy number, insurer name, agent details, and expiration dates. The search subsystem supports filtering items by price range, purchase date range, store code, location code, or a substring match within item descriptions. Data is persisted by saving the entire program back to tape via SAVE with a LINE parameter, so the initialized arrays are preserved as part of the program. Variables such as `W` (=1), `Z` (=0), `T` (=21), and `Y` (=150) are set once in the initialization subroutine at line 6000 and reused throughout to save memory. *** ## Program Analysis ### Program Structure The program is organized into well-defined functional blocks accessed via menu-driven `GO TO` branching. The initialization subroutine at line `6000`–`7000` is called first via `GO SUB 6000` at line `2`. From the main menu at line `101`, five options branch to the following sections: 1. Lines `4300`–`4510`: View/modify general insurance policy information 2. Lines `322`–`595`: Enter new items sequentially 3. Lines `900`–`2320`: View/modify existing items with search and filter 4. Lines `2700`–`2980`: View/modify store code lookup table 5. Lines `3000`–`4080`: End run / save data to tape A secondary listing-type menu appears at lines `902`–`975`, offering seven sort/filter modes. The actual filtering logic is consolidated in a shared loop at lines `2396`–`2442`, dispatched to by `GO TO 2385` from multiple entry points. ### Initialization and Variable Conventions The subroutine at line `6000` establishes all constants and data structures. A notable convention throughout the entire program is the use of single-letter variables as named constants: | Variable | Value | Purpose | | --- | --- | --- | | `W` | 1 | Used in place of the literal `1` throughout | | `Z` | 0 | Used in place of the literal `0` throughout | | `T` | 21 | Bottom status/prompt row for `PRINT AT` | | `Y` | 150 | PAUSE duration used for brief pauses | | `E$` | 32 spaces | Blank line used to erase the prompt row | This convention saves memory because single-letter variable references are shorter tokens than two-digit or three-digit numeric literals in the tokenized program. ### Data Storage Up to 100 items are stored across four string arrays and one numeric array, all dimensioned at line `6012`–`6017`: - `I$(100,27)` — item description (27 characters) - `C(100)` — cost as a floating-point number - `D$(100,5)` — purchase date in `MM/YY` format (5 characters) - `S$(100,7)` — store code (7 characters) - `L$(100,6)` — location code (6 characters) An additional pair of arrays, `U$(18,7)` and `V$(18,19)`, holds a lookup table of up to 18 store codes paired with full store names. Policy-level information is stored in scalar string variables: `Z$`, `Y$`, `M$`, `P$`, `N$`, and `R$`. The item number displayed to the user is offset by `P` (entered at line `36` and decremented by 1 at line `38`), allowing the user to number items starting from any value rather than always beginning at 1. This offset is consistently applied when printing and validating item numbers. ### Search and Filter System The search subsystem uses a temporary index array `T(100)` to hold matching item indices. A unified filter loop at lines `2396`–`2442` handles all six search types using the current value of `A` to dispatch to the appropriate comparison: - By price range: compares `C(I)` against upper (`U`) and lower (`LL`) bounds - By date range: compares substrings of `D$(I)` against dates stored in `G$` and `B$` - By store code: prefix-matches `S$(I)` using the length `LS` of the query string `A$` - By location code: prefix-matches `L$(I)` similarly - By item name: sliding-window substring search within `I$(I)` at lines `2420`–`2425` A cross-search feature at lines `2001`–`2010` allows a second filter to be applied to results already in `T()` by checking `S=W` and branching to line `5000` (not present in this listing — a potential missing section). The variable `S` tracks whether the current result set is from a prior search. ### Display and Pagination Item listings are paginated five records at a time. The variable `F` tracks the current page offset into `T()`, while `K` tracks the remaining count. Each record occupies three display rows: item number and description on one line, cost and dates on the next. The column layout is fixed: | Column | Field | | --- | --- | | 4– | Item number (right-justified) | | 5 | Item description | | 5–11 | Cost (right-justified with $ prefix) | | 12 | Purchase date | | 18 | Store code | | 26 | Location code | The prompt row at line 21 (`T`) is cleared before each new prompt by printing `E$` (32 spaces) using `PRINT AT T,Z;E$`. ### Tape Save Mechanism At line `3070`, the program saves itself with `SAVE "INS" LINE 3`. Using `LINE 3` means the program will auto-run from line `3` on reload, skipping the `GO SUB 6000` initialization at line `2` — this means re-loaded data would bypass re-initialization, preserving array contents loaded from tape. The save sequence includes on-screen tape preparation instructions (lines `3005`–`3040`) before waiting for the user to press `S`. ### Bugs and Anomalies - Line `900` in the main menu dispatch (`IF A=3 THEN GO TO 900`) targets line `900`, but the listing jumps directly to line `902`; line `900` is absent from the listing, making this a missing line. The program would report an error if option 3 is selected from the main menu. - Line `2385` is referenced by multiple `GO TO 2385` statements (lines `2550`, `2590`, `2620`, `2670`) but is not present in the listing; the nearest present line is `2395`. This would cause errors for search modes 3–6. - Line `2466` is the target of `GO TO 2466` at line `2454`, but the listing shows line `2468` as the next line after `2457`; line `2466` is missing, which would cause an error when choosing to list search results. - Line `2108` is referenced at lines `2290` and `2300` but is absent; the nearby present line is `2109`. Continuing to the next page of results would fail. - Line `2080` is the target of `IF A=W THEN GO TO 2080` at line `2020`, but it does not exist in the listing; the next present line is `2090`. Selecting item-number search would fail. - Line `5000`, the cross-search entry point branched to at line `2006`, is absent from the listing entirely. - The store code view is entered via `GO TO 2700` at line `240`, but line `2700` is absent; the nearest present line is `2731`. Option 4 from the main menu would fail. - Lines `2920` and `2700` are referenced but absent, suggesting portions of the listing may have been omitted or lost. - At line `2240`, `J` is set to `6.333333` as a workaround to position the edit cursor on a fixed row (row 18) when editing an item selected by number, since the display formula `J*3-W` is used elsewhere. This is an intentional but fragile hack. ## Source Code ``` 1 REM "INS3" 2 GO SUB 6000 3 CLS 10 PRINT AT 7,W;"THE INSURANCE PROPERTY RECORD" 12 PRINT AT 9,4;"(C)1982 TIMEWORKS INC." 30 PAUSE Y 32 IF B1>W THEN GO TO 45 34 PRINT AT T,Z;"INPUT FIRST ITEM NUMBER?" 36 INPUT P 38 LET P=P-W 101 CLS 103 LET MP=Z 104 LET CP=Z 105 PRINT AT Z,Z;"***INSURANCE PROPERTY RECORD***" 107 PRINT 110 PRINT AT 2,Z;"WHAT WOULD YOU LIKE TO DO ?" 115 PRINT AT 6,Z;"1. VIEW/MODIFY INFORMATION" 117 PRINT 120 PRINT "2. ENTER NEW ITEMS" 125 PRINT 130 PRINT "3. VIEW/MODIFY ITEMS" 135 PRINT 140 PRINT "4. VIEW/MODIFY STORE CODES" 145 PRINT 160 PRINT "5. END RUN (STORE NEW DATA)" 170 INPUT A 210 IF A=W THEN GO TO 4300 220 IF A=2 THEN GO TO 322 230 IF A=3 THEN GO TO 900 240 IF A=4 THEN GO TO 2700 250 IF A=5 THEN GO TO 3000 300 GO TO 100 310 PRINT AT Z,Z;" NO COST PDATE STORE LOC" 320 PRINT AT W,Z;"---- ------ ----- ------- ------" 321 RETURN 322 CLS 324 GO SUB 310 325 LET J=Z 326 LET B=B1 328 IF B1>100 THEN GO TO 4200 330 FOR I=B TO 100 331 LET B1=I 332 IF I>100 THEN GO TO 4200 335 LET CP=Z 337 LET J=J+W 341 IF J<7 THEN GO TO 351 343 PRINT AT T,Z;E$ 344 PRINT 345 PRINT 346 PRINT 347 PRINT AT Z,Z;E$ 348 PRINT AT W,Z;E$ 349 GO SUB 310 350 LET J=6 354 PRINT AT J*3-W,4-LEN STR$ (I+P);I+P 355 PRINT AT T,Z;"INPUT ITEM DESCRIPTION?" 357 INPUT I$(I) 359 IF I$(I,1 TO 10)=" " THEN GO TO 100 360 PRINT AT T,Z;E$ 362 PRINT AT J*3-W,5;I$(I) 364 PRINT AT T,Z;"ENTER COST?" 365 INPUT A$ 367 IF A$="" THEN GO TO 400 370 LET C(I)=VAL A$ 380 PRINT AT T,Z;E$ 390 PRINT AT J*3,5;" ";AT J*3,5;"$";TAB 11-LEN A$;C(I) 395 IF CP=W THEN GO TO 640 400 PRINT AT T,Z;"ENTER PURCHASE DATE?(MM/YY)" 410 INPUT D$(I) 430 PRINT AT J*3,12;D$(I) 432 PRINT AT T,Z;E$ 440 PRINT AT T,Z;"INPUT STORE CODE?" 450 INPUT S$(I) 460 PRINT AT J*3,18;S$(I) 480 PRINT AT T,Z;"INPUT LOCATION CODE?" 490 INPUT L$(I) 500 PRINT AT T,Z;E$ 510 PRINT AT J*3,26;L$(I) 560 PRINT AT T,Z;"CHANGES?(Y/N)" 570 IF INKEY$="Y" THEN GO TO 600 580 IF INKEY$="N" AND MP<>W THEN GO TO 870 582 IF INKEY$="N" AND MP=W THEN GO TO 2180 590 GO TO 570 591 PRINT AT T,Z;E$ 592 NEXT I 595 GO TO 100 600 PRINT AT T,Z;E$ 602 LET CP=W 603 PRINT AT T,Z;"CHANGE ITEM DESCRIPTION?" 604 INPUT A$ 605 PRINT AT T,Z;E$ 606 IF A$="" THEN GO TO 609 607 LET I$(I)=A$ 608 PRINT AT J*3-W,5;I$(I) 609 PRINT AT T,Z;"CHANGE COST?" 610 INPUT A$ 620 IF A$="" THEN GO TO 640 630 GO TO 370 640 PRINT AT T,Z;"CHANGE PURCHASE DATE?" 650 INPUT A$ 660 PRINT AT T,Z;E$ 670 IF A$="" THEN GO TO 700 680 LET D$(I)=A$ 690 PRINT AT J*3,12;D$(I) 700 PRINT AT T,Z;"CHANGE STORE CODE?" 710 INPUT A$ 715 PRINT AT T,Z;E$ 720 IF A$="" THEN GO TO 750 730 LET S$(I)=A$ 740 PRINT AT J*3,18;S$(I) 750 PRINT AT T,Z;"CHANGE LOCATION CODE?" 760 INPUT A$ 765 PRINT AT T,Z;E$ 820 IF A$="" AND MP=Z THEN GO TO 560 825 IF A$="" AND MP=W THEN GO TO 2270 828 LET L$(I)=A$ 829 PRINT AT J*3,26;L$(I) 850 IF MP=Z THEN GO TO 560 860 IF MP=W THEN GO TO 2270 880 NEXT I 890 GO TO 4200 902 LET K=Z 903 LET S=Z 905 DIM T(100) 906 CLS 910 PRINT AT Z,Z;"HOW WOULD YOU LIKE TO LIST ITEMS" 915 PRINT 920 PRINT "1. BY ITEM NUMBER" 925 PRINT 930 PRINT "2. BY PRICE" 935 PRINT 940 PRINT "3. BY DATE OF PURCHASE" 945 PRINT 950 PRINT "4. BY STORE" 955 PRINT 960 PRINT "5. BY LOCATION" 965 PRINT 970 PRINT "6. BY ITEM" 972 PRINT 975 PRINT "7. RETURN TO MAIN MENU" 980 GO TO 2001 2000 GO TO 101 2001 IF A=W THEN GO TO 2015 2002 IF S<>W THEN GO TO 2015 2004 PRINT AT T,Z;"X-SEARCH?(Y/N)" 2006 IF INKEY$="Y" THEN GO TO 5000 2008 IF INKEY$="N" THEN GO TO 2015 2010 GO TO 2006 2015 LET S=Z 2016 LET ST=B1-W 2017 PRINT AT T,Z;"ENTER LIST TYPE?(1-7)" 2018 INPUT A 2019 PRINT AT T,Z;E$ 2020 IF A=W THEN GO TO 2080 2030 IF A=2 THEN GO TO 2350 2040 IF A=3 THEN GO TO 2500 2050 IF A=4 THEN GO TO 2580 2060 IF A=5 THEN GO TO 2600 2070 IF A=6 THEN GO TO 2650 2077 IF A=7 THEN GO TO 100 2079 GO TO 906 2090 PRINT AT T,Z;"INPUT ITEM NUMBER?" 2093 INPUT D 2094 IF DP+100 THEN GO TO 2093 2101 PRINT AT T,Z;E$ 2102 FOR K=W TO 5 2103 LET T(K)=D+K-W-P 2104 NEXT K 2105 LET K=K-W 2106 LET F=-4 2109 CLS 2110 IF K=Z THEN GO TO 906 2111 GO SUB 310 2112 LET F=F+5 2113 LET K=K-5 2114 LET J=Z 2115 FOR I=F TO F+4 2117 IF I>100 THEN GO TO 2150 2120 LET J=J+W 2125 IF T(I)=Z THEN GO TO 2160 2130 PRINT AT J*3-1,4-LEN STR$ (T(I)+P);T(I)+P;TAB 5;I$(T(I));AT J*3,5;"$";TAB (11-LEN STR$ C(T(I)));C(T(I));TAB 12;D$(T(I));TAB 18;S$(T(I));TAB 26;L$(T(I)) 2150 NEXT I 2160 LET MP=W 2165 LET S=W 2170 PRINT AT T,Z;"CHANGES?(Y/N)" 2180 IF INKEY$="Y" THEN GO TO 2210 2190 IF INKEY$="N" AND K<=Z THEN GO TO 2305 2191 IF INKEY$="N" AND K>Z THEN GO TO 2295 2200 GO TO 2180 2210 PRINT AT T,Z;E$ 2220 PRINT AT T,Z;"ENTER ITEM NUMBER?" 2225 INPUT I 2230 IF IP+B1-W THEN GO TO 2225 2231 LET I=I-P 2232 PRINT AT 18,4-LEN STR$ (I+P);I+P;TAB 5;I$(I);AT 19,5;"$";TAB (11-LEN STR$ C(I));C(I);TAB 12;D$(I);TAB 18;S$(I);TAB 26;L$(I) 2240 LET J=6.333333 2260 GO TO 600 2270 PAUSE Y 2272 LET F=F-5 2273 LET MP=Z 2274 LET K=K+5 2290 GO TO 2108 2295 PRINT AT T,Z;"PRESS -C- TO CONTINUE " 2297 IF INKEY$="C" THEN GO TO 2108 2300 GO TO 2297 2305 PRINT AT T,Z;"PRESS -M- FOR MENU" 2310 IF INKEY$="M" THEN GO TO 906 2320 GO TO 2305 2350 PRINT AT T,Z;"INPUT PRICE RANGE........" 2355 PAUSE Y 2356 PRINT AT T,Z;E$ 2357 PRINT AT T,Z;"INPUT UPPER LIMIT?" 2360 INPUT U 2365 PRINT AT T,Z;E$ 2370 PRINT AT T,Z;"INPUT LOWER LIMIT?" 2380 INPUT LL 2390 PRINT AT T,Z;E$ 2395 LET K=Z 2396 FOR Q=W TO ST 2397 IF S=Z THEN LET I=Q 2398 IF S=W THEN LET I=T(Q) 2401 IF A=2 THEN GO TO 2410 2402 IF A=3 THEN GO TO 2412 2403 IF A=4 THEN GO TO 2416 2404 IF A=5 THEN GO TO 2418 2405 IF A=6 THEN GO TO 2420 2410 IF C(I)>U OR C(I)VAL B$(4 TO 5) OR VAL D$(I,4 TO 5)VAL B$(1 TO 2) AND VAL D$(I,4 TO 5)=VAL B$(4 TO 5) THEN GO TO 2440 2415 GO TO 2430 2416 IF A$<>S$(I,1 TO LS) THEN GO TO 2440 2417 GO TO 2430 2418 IF A$<>L$(I,1 TO LS) THEN GO TO 2440 2419 GO TO 2430 2420 FOR O=1 TO 28-LS 2421 IF A$=I$(I,O TO O+LS-1) THEN GO TO 2430 2422 NEXT O 2425 GO TO 2440 2430 LET K=K+W 2435 LET T(K)=I 2440 NEXT Q 2442 LET T(K+W)=Z 2446 LET S=W 2450 PRINT AT 20,Z;K;" MATCHES FOUND" 2452 PAUSE Y 2453 PRINT AT T,Z;"LIST?(Y/N)" 2454 IF INKEY$="Y" THEN GO TO 2466 2456 IF INKEY$="N" THEN GO TO 906 2457 GO TO 2454 2468 CLS 2470 GO TO 2106 2500 PRINT AT T,Z;"INPUT DATE OF PURCHASE RANGE...." 2505 PAUSE Y 2510 PRINT AT T,Z;"INPUT EARLIEST DATE FIRST?MM/YY" 2515 INPUT G$ 2520 PRINT AT T,Z;E$ 2530 PRINT AT T,Z;"INPUT LATER DATE?(MM/YY)" 2540 INPUT B$ 2550 GO TO 2385 2580 PRINT AT T,Z;"INPUT STORE CODE?" 2585 INPUT A$ 2587 LET LS=LEN A$ 2590 GO TO 2385 2600 PRINT AT T,Z;"INPUT LOCATION CODE?" 2610 INPUT A$ 2615 LET LS=LEN A$ 2620 GO TO 2385 2650 PRINT AT T,Z;"INPUT ITEM NAME?" 2660 INPUT A$ 2665 LET LS=LEN A$ 2670 GO TO 2385 2731 CLS 2732 PRINT AT Z,Z;" CODE";TAB 19;"STORE";AT W,Z;"---------- --------------------" 2735 FOR I=1 TO 18 2750 PRINT AT I+W,2-LEN STR$ I;I;TAB 2;".";U$(I);TAB 13;V$(I) 2770 NEXT I 2785 PRINT AT T,Z;"CHANGES?(Y/N) " 2790 IF INKEY$="Y" THEN GO TO 2820 2800 IF INKEY$="N" THEN GO TO 2920 2810 GO TO 2790 2820 PRINT AT T,Z;"INPUT CODE NUMBER?" 2830 INPUT I 2835 IF I>18 OR I