Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Datatrieve Repeating List-Field - PLEASE HELP
       [not found] <341720f2.178322@news.mindspring.com>
@ 1997-09-20  4:00 ` Jon Derman
  0 siblings, 0 replies; only message in thread
From: Jon Derman @ 1997-09-20  4:00 UTC (permalink / raw)



I figured out the answer to a question I posted last week on
comp.os.vms.  I wanted to flatten the hierarchy of a domain with a
repeating list-field, and I used a View Domain to do it.

So if my original domain was called TEST_DOM, and it looked like this:

05 SSN PIC X(9).
05 TEST OCCURS 25 TIMES.
   07 TEST_NAME USAGE WORD.
   07 TEST_SCORE PIC X(7).

...I flattened it by doing this:

DEFINE DOMAIN TEST_FLAT_VIEW OF TEST_DOM USING
01 TEST_FLAT OCCURS FOR TEST_DOM CROSS TEST.
   03 SSN        FROM TEST_DOM.
   03 TEST_NAME  FROM TEST_DOM.
   03 TEST_SCORE FROM TEST_DOM.;

...But there is still one thing I would really like to be able to do,
and so far, I haven't been able to figure it out.  In the View Domain,
I want an element that shows the occurence number of the repeating
element TEST from the original domain -- something like TEST_INDEX
shown below:

DEFINE DOMAIN TEST_FLAT_VIEW OF TEST_DOM USING
01 TEST_FLAT OCCURS FOR TEST_DOM CROSS TEST.
   03 SSN        FROM TEST_DOM.
   03 TEST_INDEX computed by OCCURENCE# of TEST FROM TEST_DOM.
   03 TEST_NAME  FROM TEST_DOM.
   03 TEST_SCORE FROM TEST_DOM.;

...Of course, there's no such thing as "OCCURENCE#" but there must be
a way to compute it.

Can anyone help me, please?


 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-09-20  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <341720f2.178322@news.mindspring.com>
1997-09-20  4:00 ` Datatrieve Repeating List-Field - PLEASE HELP Jon Derman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox