READ FROM SUBFILE
After loading the subfile and display that on screen, I want to read the records of subfile and write them on preint file. But inspite of managing the RRN, every CHAIN command get the last record of subfile. here is the code:
C EVAL RRN = 1
C DOW RRN < 13
C RRN CHAIN SFLREC
C EVAL PTITLE = SFLTITLE
C EVAL PNO = SFLNO
C EVAL PAMTC = SFLAMTC
C EVAL PAMTD = SFLAMTD
C EVAL PLMT = SFLLMT
C EVAL PMARK = SFLMARK
C WRITE DETAIL
C EVAL RRN = RRN + 1
C ENDDO
and here is the introduction of subfile:
A R SFLREC SFL
A SFLTITLE 20 O 9 2
A SFLNO 2Y 0O 9 24
A SFLAMTC 13Y 3O 9 28EDTCDE(J)
A SFLAMTD 13Y 3O 9 47EDTCDE(J)
A SFLLMT 9Y 3O 9 66EDTCDE(J)
A SFLMARK 1 O 9 79COLOR(RED)
** SUBFILE CONTROL FORMAT
A R CONTROL SFLCTL(SFLREC)
A 85 SFLDSPCTL
A 95 SFLDSP
A 75 SFLCLR
A SFLSIZ(0050)
A SFLPAG(0013)
A 65 SFLINZ
A SFLRNA
A 90 SFLEND(*MORE)
A OVERLAY PUTOVR
please help me! thanx



