In Example 11.7, the subfile DISPLIST is read with the READC operation (lines 4 and 11). The subfile records are processed (lines 6 to 8), and then the subfile record is updated with the UPDATE operation (line 9). The logic of this example is as follows:
Display the subfile control record and the subfile.
Read the first changed subfile record.
If there are changed records, process the first record.
Update the record (line 9).
Read the next changed subfile record (line 10).
Branch to the top of the DO loop (line 12 branch to line 5).
Example 11.7: Update subfile record.
.....FFileName++IFEASFRlen+LKeylnKFDevice+.Functions++++++++++++++++++++++++++++ 0001 FCUSTINQ CF E WORKSTN SFile(DispList : rrn) .....CSRn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++DcHiLoEq.... 0002 C EXFMT SFLCTL 0003 C ReadC DispList 75 0004 C Eval EndOfSFL = *IN75 0005 C Dow EndOfSFL = *OFF 0006 C Option casEQ '1' Select 0007 C Option casEQ '9' Delete 0008 C ENDcs 0009 C Update DispList 0010 C ReadC DispList 75 0011 C Eval EndOfSFL = *IN75 0012 C endDo