To display value of periodic group field



Software AG's platform-independent programming language with full support for open-source and Internet applications

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 ?
diptisaini
 
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To display value of periodic group field

 

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.
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.
ASSIGN #I = C*NEW-ASSET-ATTRIBUTE-GROUP
DISPLAY NEW-ASSET-ID (1:#I)

FOR #I = 1 C*NEW-ASSET-ATTRIBUTE-GROUP
  DISPLAY NEW-ASSET-ID (#I)
User avatar
RGZbrog
 
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Location: California, USA
Has thanked: 0 time
Been thanked: 0 time

Re: To display value of periodic group field

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

Thanks
diptisaini
 
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Natural

 


  • Related topics
    Replies
    Views
    Last post