To give you an example of how we used a distributed file
...
We created several "normal" files, called "ENQUIRIES.YY"
where YY was the year. Because our first year was 86, we created a
partfile-definition i-descriptor of "YY-85". Now, YY *MUST* be a part of
the @ID. Partfile 1 was ENQUIRIES.86, partfile 2 was ENQUIRIES.87, etc etc.
All of these files are just *NORMAL* files except, when you
try to write to them, the file write evaluates the i-descriptor based on the
record key, and if the result doesn't match partfile number, the write will fail.
You can now create *AS* *MANY* F VOC entries as you wish,
containing in field 2 a multi-value list of os-level-file-names. And you can
access these just like any normal file.
What I think happens is that, for ALL opens, the OPEN looks
for a mv list in field 2, then opens the first file in the list. If this file
has a part algorithm, it flags the file as distributed, and checks the part number for all files in the FILE. Then when you try to read or write, it evaluates the algorithm and goes to whichever partfile matches. If the partfile
doesn't exist (there's no obligation for it to), then the read or write
fails.
So, when we were producing "calendar year" reports, we'd
just report on the (apparently) normal file ENQUIRIES.87. If we wanted the 87
financial year, we would again just report on the (apparently) normal file ENQUIRIES.8687, which just happened to have a VOC entry
00001: F
00002: ENQUIRIES.86 @vm ENQUIRIES.87
00003: D_ENQUIRIES.
And should we need it, we had a super-file called ENQUIRIES. which had a mv list of all the files, so we could report on that if
we needed a list of every transaction by a given customer.
This actually is a very good use of distributed files,
where data is time sensitive, rapidly obsolete, but occasionally wanted for reports back to the year dot. Especially if data is generated like there's no
tomorrow ...
Oh - and watch out if you use indices - once you've got
your brain round it it's quite intuitive :-) Good Prime design again
:-)
Cheers,
Wol From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Johnson Sent: 29 January 2004 23:40 To: U2 Users Discussion List Subject: Re: Distributed & multipart files [as RE: [UV] Resize - Dynamicor64 bit?] Just curious. Are Distributed files handled by the
OS or the programmer. One client of mine had 12 monthly files (2-3 million records each) and the software combined the data into work files for cross-month
queries.
thanks.
*********************************************************************************** This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system. Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333. *********************************************************************************** |
_______________________________________________ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users