READC (READ NEXT CHANGED SUBFILE RECORD)


In Example 11.6, line 2 uses the EXFMT operation to write and then read the subfile control record SFLCTL. When the subfile control record is written to the workstation file, the subfile detail records also are written.

Example 11.6: Read next changed subfile record.

start example
 .....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                   Dou       EndOfSFL = *ON 0004 C                   ReadC     DispList                               75 0005 C                   Eval      EndOfSFL = *IN75 0006 C     OPTION        casEQ     '1'           Select 0007 C     OPTION        casEQ     '9'           Delete 0008 C                   endcs 0009 C                   endDo 
end example

The READC operation (line 4) reads each record of the subfile that has been modified. Technically, each record that has the modify data tag set on is returned with the READC operation. The modify data tag is a 5250 data-stream flag that is switched on when the workstation user types data into a field that is displayed on the workstation.

The subfile relative record number field RRN is updated with the relative record number of the subfile record just processed by the READC operation.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net