Getting Started with TRANSACT (32247-90007)
Chapter 4 79
Using KSAM and MPE
Using MPE Files
Updating Records
Figure 4-7. Program to Update Records in an MPE File
5 Since there is no chained access to MPE files, we set up a match criterion
to match on part-number.
6 FIND(SERIAL) reads the file serially. For each part-number that matches
the part-number value specified in line 5, the check-it-out routine is
performed.
19 Updating a record in an MPE file uses the same verb and syntax as
updating a record in an IMAGE dataset.
1 system ex35,file=batchinv(update);
2 list(auto) batchinv;
3 level;
4 data part-number;
5 set(match) list (part-number);
6 find(serial) batchinv,perform=check-it-out;
7 end;
8 exit;
9
10 check-it-out:
11
12 display;
13 input "is this the record to update?";
14 if input="Y","YES"
15 then
16 do
17 data(set) location:
18 quantity;
19 update batchinv;
20 doend;
21 return;