From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,d1b4087c80c9e119,start X-Google-Attributes: gid1164f8,public From: derman@mindspring.com (Jon Derman) Subject: Datatrieve Repeating List-Field - PLEASE HELP Date: 1997/09/20 Message-ID: <3424fca8.18663999@news.mindspring.com>#1/1 X-Deja-AN: 274098272 References: <341720f2.178322@news.mindspring.com> X-Server-Date: 20 Sep 1997 16:43:39 GMT Organization: MindSpring Enterprises Newsgroups: comp.sys.dec 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?