Retrievive index definations
Stan-Lyn, Stanley Barnett
stanley at stanlyn.com
Mon Oct 21 08:49:41 PDT 2019
Hi Ken,
>> While you seem to be currently storing the tags in a field in your GL code table, which is fine, they could also be parsed out and stored in a GL_tags table with a key of the GL_code and a tag in each record.
Agreed, but the length if the tag in the GL_tags table can be 16, while the length is 256 in the GL table. No human ever edits the GL_tags table.
Since the GL table once setup and defined is rarely visited or edited by the user, then the slowness in maintaining both tables should be easy and fast. I would delete all records within the GL_tags table where its key matches the key of the edited GL’s key. Then recreate all them when saving.
I need to create function code that will traverse the entire length of the tag field’s value, creating a new GL_tag record for each parsed value. The record count can be very high because get every possible occurrence for every 3-16 places. Let me explain.
Previously defined date:
b. 4567-1127, LODGING, motel- hotel- extended stay- Super8- Marriot- Days Inn- Motel 6- business- and more...
The tag field’s date is: motel- hotel- extended stay- Super8- Marriot- Days Inn- Motel 6- business-
A function would need to create new records like this starting with a minimum of 3 chars and a max of 16 chars.
The 3 char list
mot
ote
tel
el-
l-
hot
ote
tel
el-
l-
ext
xte
ten
end
nde
ded
ed
d s
tay
ay-
y-
- S
And on and on until the end of field occurs, then we do it again as a 4 characters version, and then a 5 character version and on and on until we get to the max of 16 character version. We should probably parse out the human delimiter “- “ (dash + space) as that would shorten the list, as well as ending the length as soon as 3 spaces are encountered.
The 4 char version looks like:
mote
otel
tel-
el-
l- h
- ho
Hot
Hote
Otel
tel-
el-
l- e
- ex
Exte
Xten
Tend
And on and on until 3 spaces are encountered.
And, the 11 char version would look like:
motel- hote
otel- hotel
tel- hotel-
el- hotel-
l- hotel- e
* hotel- ex
hotel exten
otel- extend
tel- extende
el- extended
l- extended
- extended s
And on and on until end of field or 3 spaced are encountered.
Ken, what are your thoughts so far?
Thanks,
Stanley
From: Ken Cole <ken.m.cole at gmail.com>
Sent: Monday, October 21, 2019 6:19 AM
To: Stan-Lyn, Stanley Barnett <stanley at stanlyn.com>
Subject: Re: Retrievive index definations
Hi Stanley,
Just kicking the tag thing around in my head and I think I have a solution.
While you seem to be currently storing the tags in a field in your GL code table, which is fine, they could also be parsed out and stored in a GL_tags table with a key of the GL_code and a tag in each record.
You would need an index on the GL_code and tag as well as an index just on the tag field.
The popup from the data entry field then looks up on the tag index and shows the applicable GL_code.
You c would need a function to create the new table from the existing data as well as code to keep the new tag table up to date as users make changes/add tags.
Not that big a job either.
Your thoughts?
Regards
Ken
On Fri, 18 Oct 2019 at 18:31, Stan-Lyn, Stanley Barnett <stanley at stanlyn.com<mailto:stanley at stanlyn.com>> wrote:
Hi Ken,
I was hoping for a filepro function that outputs the indexes definition that can then be used in a script file to create or recreate the index. Since it appears that no filepro function exists, your template index idea may be the best idea yet.
As for work, night would be good and the machines are available on the internet.
I'm trying to come up with an easy way to do a GL code lookup by a tag name. The idea here is the GL table has a long field named "tags" where tag names will be added in any order.
Then when the user triggers a lookup via a hot key within the accounts payable form, it presents the user with an input popup that receives a value from the user to search for. That value will then be used to do a "contains" search against the "tags" field.
The system then presents the user with a selectable combo box with all the records that matches/contains the value searched for. The user selects one and presses enter and the GL # will be inserted within the AP.
Any ideas on how to pull this off? The forms are full with no scrolling fields. Upgrading is probably not an option, however if there enough compelling stuff, then they may be interested.
There is also another unrelated complex piece that needs built.
Let me know your rates and your payment procedures...
Thanks,
Stanley
-----Original Message-----
From: Ken Cole <ken.m.cole at gmail.com<mailto:ken.m.cole at gmail.com>>
Sent: Wednesday, October 16, 2019 1:59 AM
To: Stan-Lyn, Stanley Barnett <stanley at stanlyn.com<mailto:stanley at stanlyn.com>>
Subject: Re: Retrievive index definations
Hi Stanley,
You are right that it isn't ASCII and human readable but with the requisite knowledge you can extract the index header data from an existing index using dd and awk and some shell script.
ABE=ASCII does not work with indexes.
What we do is regularly run a script through all our tables that create what we call "template indexes", just the header info. So we end up with a file in each table named index.TA as the template for index A. If index A gets deleted we just copy index.TA to index.A and rebuild it.
Nancy does have some great ideas with using IXSORT and also having a "Rebuild Index Menu" that you add indexes to each time you create one with the correct dxmaint command line.
With IXSORT you could create a table for all the indexes for all your tables and correspondingly the sort info. You could then have a function that cretaes a dxmaint command from that sort info to rebuild the index.
What we do currently is just a legacy thing dating back nearly 20 years so it works and we haven't changed it. Also I think from memory it only works on automatic indexes and not demand indexes.
As for doing work for you, I am in Australia, not the US, so that may or may not work for you. Financially with a week AUD currently compared to the USD it would be cheap for you to use me no doubt.
Also, I could be working in your night so not impacting daily production usage. I have been working on Sco systems for 30+ years so that doesn't worry me.
Are these systems accessible from the internet?
Let me know if I can be of asssitance.
Regards
Ken
On Wed, 16 Oct 2019 at 04:00, Stan-Lyn, Stanley Barnett <stanley at stanlyn.com<mailto:stanley at stanlyn.com>> wrote:
>
> Thanks Ken,
>
>
>
> Just looked and what I see (by more’ing the index.A file) is not of
> any use. Here is a copy/paste of it…
>
> # m index.A
>
> "index.A" may be a binary file. See it anyway?
>
> index.A
>
> ESC[G
>
> 9<C1>^C^@^@^@>^@^@^D^@^@C^@^@^@<D0><83>^@^@^L^@^D^@^A^@^@^@^L^@^@Y^@^@
> ^@^@^@^@^@
>
> ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
> ^@^@^@^@^@
>
> ^
>
>
>
> I have ??dcabe?? set to ascii. Is there such a thing for dxmaint? Any suggestions?
>
>
>
> Also, do you do any outside work, as I need an extra pair of hands on
> adding a few features to an filepro 5.0.14d4 app on sco os5. If
> interested, call me at 859-402-8165…
>
>
>
> Thanks, Stanley Barnett
>
>
>
>
>
>
>
> From: Ken Cole <ken.m.cole at gmail.com<mailto:ken.m.cole at gmail.com>>
> Sent: Monday, October 14, 2019 6:12 PM
> To: Stan-Lyn, Stanley Barnett <stanley at stanlyn.com<mailto:stanley at stanlyn.com>>
> Cc: filepro-list at lists.celestial.com<mailto:filepro-list at lists.celestial.com>
> Subject: Re: Retrievive index definations
>
>
>
> Stanley,
>
>
>
> The definition is in the header of the index.
>
>
>
> Under Unix we use standard file manipulation tools to extract and store that detail fir the exact reason you suggest.
>
>
>
> Under Windows you could probably use GNU tools or maybe PowerShell to do the same.
>
>
>
> The header is different depending on how the indexes were created/which version of FP used to create them.
>
>
>
> The index header info used to be on the FPTech web site.
>
>
>
> Ken
>
>
>
> On Tue, 15 Oct 2019 at 07:07, Stan-Lyn, Stanley Barnett via Filepro-list <filepro-list at lists.celestial.com<mailto:filepro-list at lists.celestial.com>> wrote:
>
> Hi,
>
>
> Is there a way to retrieve the index definitions of a data file where its indexes were built via the gui? So instead of ./dxmaint table -bs -ra -e -h "Rebuilding All Indexes" that rebuilds all the indexes without knowing anything about the indexes, I need to build them individually with the dxmaint command. Sometimes an index gets deleted and without this info, I have to spend a lot of time tracking down the process that uses the deleted index and then try and figure out how it was constructed. If this info can be gathered near creation time, I would have a library of the index definitions. I'm using SCO Unix here. So is there a filepro function or a storage location where the definition can be retrieved?
>
>
> Thanks,
>
> Stanley
>
>
> -------------- next part -------------- An HTML attachment was
> scrubbed...
> URL:
> <http://mailman.celestial.com/pipermail/filepro-list/attachments/20191
> 014/1c785552/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com<mailto:Filepro-list at lists.celestial.com>
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20191021/ed1deed3/attachment.html>
More information about the Filepro-list
mailing list