READC - Read Next Changed Record
The READC operation can be used only with an externally described WORKSTN file to obtain the next changed record in a subfile. The |record-name operand is required and must be the name of a record format defined as a subfile by the SFILE keyword on the file description specifications.
It will Read the Next Changed Subfile Records.
Eg:
<pre>C EXFMT CTLCUS
C :
* SCUSNO, SCUSNAM, SCUSADR, and SCUSTEL are fields defined in the
* subfile. CUSNAM, CUSADR, and CUSTEL are fields defined in a
* record, CUSREC which is defined in the file CUSINFO.
*
C READC SFCUSR
C DOW %EOF = *OFF
C SCUSNO CHAIN (E) CUSINFO
* Update the record only if the record is found in the file.
C :
C IF NOT %ERROR
C EVAL CUSNAM = SCUSNAM
C EVAL CUSADR = SCUSADR
C EVAL CUSTEL = SCUSTEL
C UPDATE CUSREC
C ENDIF
C READC (E) SFCUSR
C ENDDO
</pre>
Pradeep.
Last Wiki Answer Submitted: November 23, 2011 8:07 am by deepu93213,520 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.