I need to update the primary key of a indexed record which I am reading it sequentially i know that i cannot use rewrite to do that, Any suggestion
The first 5 move statement is primary key.
move perdt1-pno to perat-pno
move zeros to perat-bno
move space to perat-eng-type
move space to perat-shift-code
move zeros to perat-area
start perat-file key > perat-key
invalid key
set end-of-infile to true
not invalid key
read perat-file next ignore lock
at end
continue
end-read
display "meow"
perform
varying ws-sub from 1 by 1
until ws-sub > 10
or perat-pno not = perdt1-pno
if (perat-pno = perdt1-pno)
and (in-apc <> perat-bno)
display "meow2"
display perat-pno
move in-apc to perat1-bno
move in-perat-area
to perat1-area
move in-primary-skill
to perat1-eng-type
if in-primary-skill <> spaces
move "P" to perat-primary-skill
else
move "S" to perat-primary-skill
end-if
//i cant do rewrite here.