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: January 7, 1998 12:25 PM Wednesday; Rod Welch

Converted SDS Sales Points Subject Index into 3 sub-indexes.

1...Summary/Objective
2...I segmented the index into three parts...
3...03501 - Change Sort for "SDS Selling Points" Subject
4...01051X - Supersort Command File to Combine Sales Points
5...Convert Existing Records to New SI Scheme
6...0810 - Convert Control Fields to New Scheme for SDS Sales Points
7...08101 - Convert Weekly Pointer Files for Control Fields
8...04702 - Add Feature to Delete Temporary Files on Start Up


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

CONTACTS 

SUBJECTS
Segmenting Subject into Smaller Indexes
Memory Exceeded Subject Index Segmented Too Big Subjects Have Exceede
Segment Index into Smaller Indexes that Fit SDS Memory Limitations
Index Segment into Smaller Indexes that Fit SDS Memory Limitations
Memory Exceeded Subject Index Segmented Too Big Subjects Have Exceede

1107 -
1107 -    ..
1108 - Summary/Objective
1109 -
110901 - Follow up ref SDS 9 2976, ref SDS 8 0000.
110902 -
110903 - Converted the SDS Subject Index for ... 1C "Sales Points" so it is
110904 - segmented into 3 separate files in order to reduce the frequency of
110905 - crashing due to exceeding memory capacity.  Converted existing SDS
110906 - records to the new scheme.
110907 -
110908 -     [On 030810 created generic system to segment indexes as needed
110909 -     without special programming for each one, and does not require
110910 -     updating existing assignments. ref SDS 10 QG7I
110911 -
110912 -
110913 -
110915 -  ..
1110 -
1111 -
1112 - Evaluation
1113 -
111301 - This reduced the 1C from about 130K so none of the three indexes
111302 - exceed 45K.
111304 -  ..
111305 - It may be a little awkward using the three files.  Experience will
111306 - show whether it takes more time.
111308 -  ..
111309 - The ability to sort all three files into a single list is retained.
111310 - and actually seems to take less time.  Experience will show if this
111311 - large composite file will cause the system to crash by exceeding
111312 - memory capacity.  In any case, it should happen less often.
111314 -  ..
111315 - We really need a way to read parts of a file from a large file.  This
111316 - could be done using the get command with a parameter.
111317 -
111318 -
111319 -
111320 -
111322 -  ..
1114 -
1115 -
1116 - Problem
1117 -
111701 - The subject index
111702 -
111703 -               H: sd 06 00101 &0300050 $01051C
111704 -
111705 -     ...is
111707 -                            ..
111708 -                           124K
111709 -
111710 -     ... is too big to run in W95.  The 124K plus the 200K size of
111711 -     e.exe leaves no room from SDS records.  This index runs better in
111712 -     Os2, but only marginally.  Since we are primarily using W95 at
111713 -     this time, this index needs to be segmented into smaller files.
111714 -     This will reduce the incidents of program crashes and will permit
111715 -     continued growth of the index.
111717 -  ..
111718 - The challenge is managing multiple indexes as one.
111720 -  ..
111721 - I segmented the index into three parts...
111722 -
111723 -      H: sd 06 00101 &0300050 $01051C           40K
111724 -      H: sd 06 00101 &0300050 $01051D           40K
111725 -      H: sd 06 00101 &0300050 $01051E           40K
111726 -                                              ------
111727 -                                               120K
111728 -
111730 -  ..
111731 - These separate files need to be recognized by SDS lookup functions as
111732 -
111733 -             H: sd 06 00101 &0300050 $01051C
111734 -
111735 -    ...because a lot of the record uses this subject identification.
111737 -  ..
111738 - Possibly, we can convert the record to the new scheme.
111739 -
111740 -    Did this at ref SDS 0 4271,
111742 -  ..
111743 - We need to be able to sort these three subjects as a single index in
111744 - order to look up stuff.
111745 -
111746 -    We might be able to do this using Supersort and a separate file
111747 -    for this one index.
111748 -
111749 -    The code that sorts a subject index seems to be at 03501 #21.
111750 -
111751 -        Was able to create code that sorts the three files into one.
111753 -         ..
111754 -        This is not an excellent solution because it still results in
111755 -        the system being subjected to a large file for lookup purposes.
111756 -
111757 -
111759 -  ..
1118 -
1119 -
1120 - Coding
112101 -  ..
112102 - 03501 - Change Sort for "SDS Selling Points" Subject
112103 -
112104 - Line 2280 -label sortIt, ref OF 1 4898, sorts the current list.
112105 -
112106 - This code uses Supersort with a new command file, 01051x, to combine
112107 - the three files, into a single file sorted by subject description.
112109 -  ..
112110 - Line 2360, ref OF 1 GZ7H, -label sortIt about 40 lines below
112111 -
112112 -     dose command executes Supersort command file to combine and sort
112113 -     the files.
112114 -
112116 -  ..
112117 - 01051X - Supersort Command File to Combine Sales Points
112118 -
112119 - Line 5, ref OF 3 4138, sorts the three new files into a single output
112120 - file.
112121 -
112122 -     This combines file indexes ... 1c, 1d, 1e, into a single sorted
112123 -     file, tqii, that is read by 03501.
112125 -  ..
112126 - Since this command file is unique to Rod Welch, I put it in my
112127 - Subject Index directory:
112128 -
112129 -                     h: sd 06 00101 01051x
112130 -
112131 -
112132 -     |      Sort Welch Subjects on SDS Sales Points into a single file
112133 -     |
112134 -     | <4138
112135 -     s h:\sd\06\00101\&0300050\$01051C &
112136 -       h:\sd\06\00101\&0300050\$01051D &
112137 -       h:\sd\06\00101\&0300050\$01051E
112138 -     o tqii
112139 -     se fi 2 2=":" and fi 45 45="."
112140 -     k 48 80
112141 -     g
112142 -
112143 -
112145 -  ..
112146 - Convert Existing Records to New SI Scheme
112147 -
112148 - We need to change the SDS records and the control field pointers as
112149 - follows:
112150 -
112151 -
112152 -         03 00050 01 05 1C A+   03 00050 01 05 1C
112154 -          ..
112155 -         03 00050 01 05 1C E+   03 00050 01 05 1D
112157 -          ..
112158 -         03 00050 01 05 1C M+   03 00050 01 05 1E
112160 -  ..
112161 - This requires getting a list of all the files for a year, opening
112162 - them, finding 03 00050 01 05 1C control field lines and changing to
112163 - 1D and 1E as needed.
112165 -  ..
112166 - Then we need to open the Control Field pointer files and make the
112167 - same changes.
112168 -
112169 -     [On 030810 created a generic system to segment indexes and chain
112170 -     them together, eliminated requirement to change assignments in SDS
112171 -     record control fields. ref SDS 10 O544
112173 -  ..
112174 - We could use the standard SDS record "save" function, but it would
112175 - likely crash due to memory problems and so not process everything.
112177 -  ..
112178 - Used Subject search to create a list of SDS records that are
112179 - identified by the ...1C subject.
112181 -  ..
112182 - Modified macro 0810 and ran it on the list of SDS records to complete
112183 - the conversion to the new scheme.
112184 -
112185 -
112187 -  ..
112188 - 0810 - Convert Control Fields to New Scheme for SDS Sales Points
112189 -
112190 - Line 15, ref OF 8 1932, this macro was a conversion for
112191 - something that is no longer needed, so will use it for this function.
112192 -
112193 -
112194 - Convert Control Field Pointers to new scheme.
112195 -
112196 -
112198 -  ..
112199 - 08101 - Convert Weekly Pointer Files for Control Fields
112200 -
112201 - Line 15, ref OF 8 1932, this macro uses the month/day value to create
112202 - a weeky filename. ref OF 8 1186
112203 -
112204 -
112205 -
112206 -
1123 -

SUBJECTS
Delete Temporary Files from Disk

1203 -
120401 -  ..
120402 - 04702 - Add Feature to Delete Temporary Files on Start Up
120403 -
120404 - Line 1100 -label Exectv, ref OF 10 3901, added command to remove all
120405 - tq* files.  This will eliminate temporary files form various processes
120406 - and keep the disk relatively clean.
120407 -
120408 -
120409 -
120410 -
120411 -
120412 -
120413 -
120414 -
1205 -