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



It will be true when cfco = 9 and cfacct = 1919 *OR* when cfacct = 2020. This is the type of expression where free format really helps out since now you have to figure out if this was intentional or not. Assuming this was intentional, you could write it this way in free format:

If (cfco = '9' and cfacct = '1919') or (cfacct = '2020')
do whatever
EndIf

If this is not intentional (i.e. cfco should always be checked), you could write it this way:

If (cfco = '9') and (cfacct = '1919' or cfacct = '2020')
do whatever
EndIf

In either case, it is perfectly clear what the expression is doing. Sticking with fixed format, I'd write my second example this way:

cfco ifeq '9'
cfacct ifeq '1919''
cfacct oreq '2020'
.... do whatever
endif
endif

which I find easier to read than Michael's example (they are functionally the same).

Matt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael_Schutte@xxxxxxxxxxxx
Sent: Friday, October 03, 2008 9:49 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: code question


This code will be true whenever cfacct = '2020' doesn't matter the value
of cfco. If you want to limit to '9' then you need to change to the
following.

cfco ifeq '9'
cfacct andeq '1919''
cfco oreq '9'
cfacct andeq '2020'
.... do whatever
endif


Michael Schutte
Bob Evans NEW! Farmhouse Philly Knife & Fork Sandwich: It's No Ordinary
Sandwich!
Try all four Knife & Fork Sandwiches, starting at 5.99.
For more information, visit www.NoOrdinarySandwich.com


rpg400-l-bounces@xxxxxxxxxxxx wrote on 10/03/2008 09:37:45 AM:


HI I have a question on this code.

cfco ifeq '9'
cfacct andeq '1919''
cfacct oreq '2020'
.... do whatever
endif


is there a problem here in that will it take any company 9 acct
(besides the 1919 and 2020)?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.