Hi
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
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
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?