A customer had a request a few weeks ago that went something like the
following: I have file DICT FILEA and it has no DATA file. I have
DICT and DATA FILEB. I want to make it look like the DATA file of
FILEB belongs to FILEA. You cannot put a Q pointer in a DICT of one
file that refers to the DATA of another file.
I thought this was intriguing because I know a lot of applications
have one standard dictionary which is cloned for every new similar
data file. Example: DICT PATIENT-MASTER*XXX gets copied to every
*001, *002, *nnn dictionary that gets created. To use one DICT on
DATA files belonging to different DICTS, in Access (AQL), you need to
say SORT FILEB USING FILEA XX YY XX. That can sometimes be
cumbersome.
So, I found a solution to this that is a little hokey, but hey, it
works... Use the OSFI and Super Q-pointers:
U DICT FILEA qname
001 Q
002
003 this.hostname:this.account,FILEB,
You will now be able to say LIST FILEA and you will be looking at the
data in FILEB. You can create more q-pointers in the DICT of FILEA so
that you can say LIST FILEA,FILEX or LIST FILEA,FILEY and these
files will use the DICT of FILEA, but still look at FILEX or FILEY.
A cool extension of this is another q-pointer to the construct that
you just created. Example:
new item MYINFO:
001 Q
002
003 FILEA,FILEX
Now LIST MYINFO shows the DATA from FILEX using the DICT of FILEA.
Don't use QS instead of Q because the QS pointers are saved in
file-saves and you don't want to save the pointed-to D-pointer plus
the QS info. There's also a *y bit of overhead involved because
this goes through one of your OSFI server ports - no pain, no gain...
There are all sorts of applications for this - I leave it to you to
find them. I haven't run this by anyone else yet. I know that there
is an action item open for this concept, but we don't have anything
official on it yet. It's not an official technique, but, like I said,
it works.
Have fun. Please let me know if this does you any good.
Tony
Pick Systems Quality Assurance Manager
http://www.veryComputer.com/
## Insert disclaimer here about how these comments
## are mine and not my employer's.
## Oh, I did?
## Never mind.