How to STORE data to PE group in reporting mode

I have an Adabas file as below
File1
01 Field1 (A10)
01 Filed2 (N10)
01 PE-GROUP
02 PE-FIELD1 (A10)
02 PE-FIELD2 (N10)
02 PE-FIELD3 (A5)

Now how can I store values to PE-FIELD1 in reporting mode.

As far as I knows its using move indexed, but any idea how exactly to do this.

Thanks in Advance

First things first …

Any specific reason why you need to use Reporting Mode ?

This is an existing code… something written before even I was born :slight_smile:
Now I have to alter this to store value in periodic group as well

Look up the

OBTAIN ...

statement in the Natural documentation.

Hi Abhilash;

I am guessing you are somewhat new to Natural. Hence you are not aware that there are three “modes” in Natural. In addition to Structured Mode, and “strict” Reporting Mode, there is what is officially called Structured Data Mode (I call it mixed mode). Mixed Mode is a variant of Reporting Mode, but it keeps LOOP , etc)

If the program is not too mired in strict Reporting Mode (for example, if it does not introduce new variables throughout the program, but instead does a RESET of all the variables at the start of the program) it may be easiest for you to simply convert the program to Mixed Mode. Then you get to define a View of the file and use the simplified, modern form of the UPDATE statement as opposed what I am guessing you have which is something like:

UPDATE NAME = #NAME CITY = #CITY etc.

Also, there is no reason, even in strict Reporting Mode, to use MOVE INDEXED. You can simply have arrays. For example, at the start of your program you might RESET #ARRAY (A3/1:10).

Correction. If you are working in an environment with a totally ancient version of Natural, arrays may not exist. What version of Natural are you working with?

Just to add to Wolfgang’s suggestion to look at OBTAIN, you might also want to look at GET SAME.

However, transitioning to Mixed Mode would make everything much simpler.