To display value of periodic group field

Software AG's platform-independent programming language with full support for open-source and Internet applications
diptisaini
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Skillset: Natural,Adabas,jcl
Referer: friend

To display value of periodic group field

Postby diptisaini » Fri Oct 08, 2010 3:38 pm

Hi,


PE * NEW-ASSET-ATTRIBUTE-GROUP ......
* NEW-ASSET-ID ................... (A12) D
* NEW-ASSET-DESC ................. (A30)
* NEW-ASSET-CURR-CODE ............ (A3)
* NEW-ASSET-NOM-VAL .............. (N11.3)
* NEW-ASSET-LOT-SIZE ............. (N7)
My requirement is that i want to display value of NEW-ASSET-ID but i don't know on which occurence value is populated.
Can you please provide me any example ?

User avatar
RGZbrog
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
Referer: SAG Developer Forum
Location: California, USA
Contact:

Re: To display value of periodic group field

Postby RGZbrog » Fri Oct 08, 2010 10:50 pm

Although Adabas allows up to 191 occurrences of a PE, your file and application designs should define the logical maximum, and that maximum should be used in your view. Ask Adabas to return the number of occurrences actually used in each record - by using C* notation.

Code: Select all

1 #MAX (I4)  CONST <25>
...
1 file   VIEW file-name
  2 C*NEW-ASSET-ATTRIBUTE-GROUP     /* number of occurrences actually used
  2 NEW-ASSET-ID (#MAX)             /* retrieve a maximum number of occurrences

Then code one of the following.

Code: Select all

ASSIGN #I = C*NEW-ASSET-ATTRIBUTE-GROUP
DISPLAY NEW-ASSET-ID (1:#I)

Code: Select all

FOR #I = 1 C*NEW-ASSET-ATTRIBUTE-GROUP
  DISPLAY NEW-ASSET-ID (#I)

diptisaini
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Skillset: Natural,Adabas,jcl
Referer: friend

Re: To display value of periodic group field

Postby diptisaini » Tue Oct 12, 2010 2:15 pm

Thanks


  • Similar Topics
    Replies
    Views
    Last post