140 pts.
 READE in free format
I am using rpgfree format program. 

Begsr M;                                                                       Setll (TRN) file1;

  Reade (TRN)file1;           Dow  Not %Eof(file1);  

existing functinality running..             

      Reade (Trn) file1;     Enddo;                                                                      Endsr;        

after dow loop i am inserting one chain condition if record found then contro to go reade(trn) file1; and read next record (not toucch the existin functionality). if not found read existing functionality and read next record as usuall.

I tried goto statment but it's not allowing in free format. could you advise how to come over.                       

 

 



Software/Hardware used:
ASKED: April 24, 2012  11:14 AM
UPDATED: April 25, 2012  12:07 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You can go with IF condition in this case.
Have a condition for executing the existing functionality only if the record not found. And, end the IF condition before READE statement.

Pradeep.

 3,370 pts.

 

after dow loop i am inserting one chain condition if record found then contro to go reade(trn) file1; and read next record (not toucch the existin functionality). if not found read existing functionality and read next record as usuall.

I have read that multiple times but cannot understand it. Please show the code or try to word it differently.

Tom

 107,755 pts.