|
>I should know better than to enter this discussion but ...
I thought the same thing, LOL!
Just curious, what would you do differently with the following code? Notice
how I have a DO loop (without conditions) wrapping this entire section of
code. If an error is encountered I call the $Error subroutine and ITER my
way out of the loop to avoid more errors. This goes back to my second email
where I said I should have had more ITERs within my loop.
C do
C Customer CHAIN(n) CSTMST1 99
*
C if (not *IN99)
C ITER
C else
C CLEAR *ALL RCSTMST
*
C if (BSi = 0)
C eval WSTEXT = 'Bill-To information is required
' +
C 'for new customer.'
C EXSR $Error
C ITER
C endif
*
C if (BSBZP(1) = ' ')
C eval WSTEXT = 'Bill-To information is ' +
C 'incomplete for new customer.'
C EXSR $Error
C ITER
C endif
*
C OrigCust CHAIN(n) CSTMST1 98
*
C if (*IN98)
C CLEAR *ALL RCSTMST
C eval WSTEXT = 'Default customer record not ' +
C 'found.'
C EXSR $Error
C ITER
C endif
*
C WRITE RCSTMST
C endif
*
C enddo
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.