- 论坛徽章:
- 0
|
rpg(SFL002R):
FCustfile IF E K Disk
FSfl002df CF E Workstn
F SFile(Sfl002s1 Rec#)
*
D@Rec# S 4 0
*
*-------------------------------------------------
* Load Subfile
*-------------------------------------------------
C Exsr LOADSF
*
C DOU *In03 = *On
*
*-------------------------------------------------
* Write command key, Overlay subfile with Exfmt.
*-------------------------------------------------
C Write CMDKEY
C EFMT SFL002C1
*
C Eval DSPRECORD = 1
*
*------------------------------------------------
* Roll-up key pressed, load next page of subfile
*------------------------------------------------
C If *In50 = *On
C Exsr LOADSF
C Endif
C Enddo
*
C Eval *InLR = *On
C Return
*
*---------------------------------------------------------*
* Subroutine LOADSF *
* Process Customer file and load records into subfile. *
*---------------------------------------------------------*
CSR LOADSF Begsr
*
*-----------------------------------------------
* 15 subfile records per page
*-----------------------------------------------
C Do 15
C Read CUSTR 90
*
C If *In90 = *On
C Leave
C Else
*----------------------------------------------------
* Increment subfile record number, load subfile fields.
* and write record to subfile.
*----------------------------------------------------
C Eval @Rec# = @Rec# + 1
C Eval Number = Custno
C Eval Name = Custnm
C Write SFL002S1
C Endif
*
C Enddo
*
*----------------------------------------------------
* Set the subfile records to be displayed equal to the
* last record written.
*----------------------------------------------------
C Eval DspRecord = @Rec#
*
*----------------------------------------------------
* If no records found, set on indicator to display
* message.
*----------------------------------------------------
C If @Rec# > 0
C Eval *In20 = *On
C Endif
CSR Endsr |
|