Descriptor a periodic and / or multiple fields

Hi,
Is it possible to make a descriptor a periodic and / or multiple fields?
Thank you

1 Like

Yes. There are some things to be aware of when you do so:

  • only one PE field can be included in a super-descriptor
  • descriptors on PE fields (including as super-descriptor components) cannot use READ LOGICAL on these descriptors. However, a histogram is still available, so you can do a histogram then a find to select these in sorted order (more work and more I/O, so not something you always want to do when performance matters)
  • PE descriptors include the index; MU descriptors do not. Thus, for example, the histogram can report each value by index for PE values, but not for MU descriptor values.
  • If you read by an MU descriptor, you can end up reading a record as many times as there are MU values. For example, if you READ EMPLOYEES BY LANG-CODE and an employee record has 3 language values (e.g. DEU, ENG, FRA), the record will be returned for each MU value.
  • when you read or find by MU, you don’t know which occurrence resulted in the selection. If there is more than one occurrence of the value on the MU, there will be only one entry for the ISN in the descriptor index
  • null suppression rules apply as always. If you make a descriptor of a not-null MU field, all “null” occurrences will be indexed too.
2 Likes

Hi,
Suppose I have
01 Field1 (A3)
01 Field2 ← PE
02 Field2A (A10)
02 Field2B (A5)
01 Field3 (N2)

If I do a Super with Field1 + Field2B

Will it generate a reading for each value found in Field2B or will it group all the values ​​of Field2B and will it generate a single reading?

since what I require is a single reading

what happens is that Field2B saves values ​​of different concepts that I need to group

for example:

Field2B (1) = "V "
Field2B (2) = “Singl”
Field2B (3) = "Red "

i need it like that: "V SinglRed "

thanks,
greetings

no, the index will be Field1 + Field2B for each occurrence of Field2b. But you can now AND the values, with or without indexes. Something like SP = ‘111V’ AND ‘222Singl’ AND ‘111RED’ (or whatever combination of Field1 + Field2B you need)

1 Like

THANK YOU
greetings