READ FROM SUBFILE

15 pts.
Tags:
CHAIN
RNN
Subfile
Hi, I have a problem in reading my 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
ASKED: December 13, 2007  5:22 AM
UPDATED: December 15, 2007  4:12 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try using the READC opcode instead of the CHAIN opcode.

Also, it appears you are missing the following on your SFLCTL format:

A SFL0RRN 4S 0H TEXT(‘SFL Relative Record Number’)
A SFLRCDNBR

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Vids
    The RPG code hich you have given as follows - C EVAL RRN = 1 C DOW RRN
    295 pointsBadges:
    report
  • Andy Mansell
    As suggested above the best way to read a subfile is the READC opcode. Make sure you set SFLNXTCHG, this will stop the Modified data tag from being changed allowing you to read the subfile first for validation and the again for processing.
    55 pointsBadges:
    report
  • Leiloon
    Thank you everybody for your comments, Actually my problem solved. the code you saw here was correct. my mistake was in where i use this subroutine to read the subfile. Thanks again 1
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following