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



Maybe you should write a subprocedure, maybe in a service program, that will
turn a flag into and indicator and an indicator into a flag.

Example:
myInd = flagToInd(myField);
myField = indToFlag(myInd);



**************************************************************************
P flagToInd B
D flagToInd PI n
D flag 1a const
*
/free
return flag = YES;
/end-free
*
P flagToInd E

**************************************************************************
P indToFlag B
D indToFlag PI 1a
D ind n const
*
/free
if (ind);
return YES;
endif;
return NO;
/end-free
*
P flagToInd E
--
James R. Perkins


On Thu, Jan 14, 2010 at 06:37, David FOXWELL <David.FOXWELL@xxxxxxxxx>wrote:

Hi,

Having to regularly determine the value of flags as 'Y' or 'N', then record
it in a PF.

This means having to code

IF rules satisfied;
MyFlag = gYES;

ELSE;
MyFlag = gNO;
Endif;


Then, maybe in another module,etc

IF MyFlag <> gYES;
Don't do stuff;
ELSE;
Do stuff;
Endif

Comments?
What's the reasoning behind this method?

I'd <like> to be able to use an indicator :

MyFlag = ( rules satisfied);

Then,

IF MyFlag;
do stuff;
ELSE;
Don't Do stuff;
Endif


Thanks.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.