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



Select/omit logic works by choosing the first Select/Omit statement that the record satisfies. There
an implied Omit all as the last criteria since the last explicit criteria is a select.

So what would happen is the record is checked against DATSHP first, and if it is 0 the record is
selected and the checking stops. If the record is not selected here, it checks INVNO against the
range I00000 - I99999. If the invoice number satisfies that criteria the record is selected and the
checking stops. If the record is not selected here, it checks INVNO against the range N00000 -
N99999. If the invoice number satisfies that criteria the record is selected and the checking stops.
If the record is still not selected, then it is omitted by the implied Omit All added to the end of
the Select/Omit criteria.

By putting an S on each of the criteria, they are, in effect, 'Ored' together.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Adam West
Sent: Monday, May 19, 2008 3:03 PM
To: RPG400-l@xxxxxxxxxxxx
Subject: Using a logical with an older RPG Program



HI I have to modify a very old RPG program, circa 1987, heavily cycled...

I am concerned how to do some simple logic checks in the program, so would
rather take care of as much as possible in a logical. In the example below
I really need an OR for those invoice numbers, the groups that the program
should only be concerned about. can this work as it is? Without the OR.
can there be an OR there somewhere in this logical?



0007.00 A S DATSHP CMP(EQ
0)
0008.00 A S INVNO RANGE('I000000'
'I999999')
0009.00 A S INVNO RANGE('N000000'
'N999999')

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.