× 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.



RPG II code saying, If CM contains 'CM', move '* CREDIT' to MEMO,
and *BLANKS to PONO.  If CM contains 'DM', move *BLANKS to PONO
and '*  DEBIT' to Memo.

Same thing in RPG IV following same logic:

/free

       Clear   Memo
       If      (CM = 'CM') Or (CM = 'DM')
       If      (CM = 'CM')
           Memo = '* CREDIT'
           PoNo = *Blanks
       Else
           PoNo = *Blanks
           Memo = '*  DEBIT'
       EndIf
       EndIf

/endfree

I've seen lots of this type of code, and the thing you have to remember,
RPG II at one point didn't seem to have an Else If type statemnent, so
this type of thing was used.

In more Modern Format:

/free

      If   (CM = 'CM')
          Memo = '* CREDIT'
          PoNo = *Blanks
      Else If (CM = 'DM')
          Memo = '*  DEBIT'
          PoNo = *Blanks
      EndIf
      EndIf
/endfree

(Does RPG IV Freeformat have ElseIf keyword?)

I quit tryign to make sense out of RPG II code and why it
was written the way it is a long time ago.  "They" did not
seem to have quite a few of the keywords we have to make
our lives easier.

Regards,

Jim Langston


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.