Efficient way to update periodic field?

I recently had a problem while updating a periodic field, the program running in batch mode took the mainframe down as it filled DATABASE PLOGS . The dba pointed out that since periodic fields in the view are declared as (*) it holds all the instances of periodic group during an update and when large number of records are updated PLOGS get filled very fast.

The periodic group has 7 fields and the latest record is added as C* + 1. Is there a way where I can only hold the last instance and update the view. Like reading from 1 view getting the isn and updating using second view. Or any other efficient way of updating the periodic field. I dont want to give a finite number while declaring the view

Please help in this regard


Hi Zoheb Khan!

Interesting question. But I’m afraid there is no simple workaround. Honestly, I got only one idea: Migrate the Periodic Group to a new adabas file.


Hi Matthias

Thanks for the quick reply

Yes, new file is an option and I was hoping to avoid that . As a temp fix , the plan is to give a finite number and then change the enitre process by creating a new file


Create a view that only has C*pe

Create a view that looks like:
1 myview view of file
2 pe-name (#adder:#adder
3 pe-field1
3 pe-field2
3 pe-field7

Read the record with the view that has C*pe.

Move c*pe to #adder. Add 1 to #adder.

Read the record with myview

UPDATE with myview

Haven’t tried this, but the plog should only show the single occurrence.


Hi Steve,

Thanks a lot for this.

I have manged to get this running .

Few points to note :

Myview was declared as suggested by you . i took #adder = C*pe + 1 and did a GET on Myview. I noticed in the debugger that index value for myview was shown as pe.field(1) with blank values even though value of the #adder = 2.

During update the statement myview.pe(#adder) := ‘value’ didn’t work and was showing an index error. Since the debugger showed index field for myview as (1) i tried this

#next :=1
move C*.1stView + 1 to #adder
Get myview
myview.pe1(#next) := ‘Value’
update myview

It worked perfectly. I am still testing to find if it fails but it looks all well.

What i still don’t understand is why the myview had index (1) for the view eventhough #adder was 2?