×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Date: Thu, 9 Apr 2009 08:49:14
To: <rpg400-l@xxxxxxxxxxxx>
Subject: READE reading twice instead on once: why?
Hi list!
This routine is simple and straight forward and I do not see why is doing
the loop two times when it is supposed to be only one. The key field I am
using is ORDERLINE and is defined as:
C OrderLine klist
C kfld Company
C kfld OrderType
C kfld OrderNumber
C kfld ItemSeq
I am using that field to read file SOLMRK, which has ONE record that
matches the value of ORDERLINE. This is the little piece of code in
question.
1772.00 P024 C Eval Company = SCOMNO
1773.00 P024 C Eval OrderType = SORTYP
1774.00 P024 C Eval OrderNumber = SORDNO
1775.00 P024 C Eval ItemSeq = SLINSQ
1776.00 P024 C OrderLine Setll SolMrk
1777.00 P024 C Dow Not %EoF(SolMrk)
1778.00 P024 C OrderLine Reade SolMrk
1779.00 P024 C If not %Found(SolMrk)
1780.00 P024 C Iter
1781.00 P024 C Endif
1782.00 P024 C If Company <> MPCONO
1783.00 P024 C Iter
1784.00 P024 C Endif
1801.00 P024 C Select
1802.00 | C When MMRKCB = 'CA'
1803.00 | C eval MPCSQ(SFQTR) =
MPCSQ(SFQTR)+(SInSah*MMRKPC)
1804.00 | C When MMRKCB = 'MA'
1805.00 | C eval MPMSQ(SFQTR) =
MPMSQ(SFQTR)+(SInSah*MMRKPC)
1806.00 P024 C EndSl
1807.00
1808.00 P024 C Enddo
My issue is to visualize WHY, after getting the record from SOLMRK
successfully (line 1778) , it finish the loop (line 1808), goes up again
to read (line 1778) and instead of reaching EOF (line 1780) it reads the
same record that was previously processed, printing the same record TWICE.
I got my coffee with less sugar but it seems that is not helping ... :o)
Your help is highly appreciated as always.
PETER VIDAL
MAPICS IT TECHNICAL SUPPORT TEAM / SR SYSTEM ANALYST
10540 Ridge Rd., Suite 203, New Port Richey, FL 34654-5111
Tel:727-849-9999, x2414 /// Fax:727-815-3120
WWW.PALL.COM
This communication may contain information that is confidential,
privileged and/or exempt from disclosure under applicable law.
If you are not the intended recipient, please notify the sender
immediately and delete the original, all attachments, and all
copies of this communication.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.