PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Name the Indicators - Tip3

Go down

Name the Indicators - Tip3 Empty Name the Indicators - Tip3

Post  maran Thu Feb 09, 2012 12:08 pm

Assign the results of logical expressions to indicators

From the very start of RPG IV the following has been valid syntax:

*IN90 = *IN80 or *IN81 or *IN82 ;

Which simply means: Set indicator 90 to true if any of indicators 80, 81,or 82 are true.

It looks even better when we name the indicators:

*In(errorFound) = *In(invalidAccount) or *In(invalidProduct) or . . .

This ability is not restricted to indicator expressions. For example the following is perfectly valid:

d overdueBalance_40...
d c 40

/Free

// Set print control indicator 40 if payment overdue
*In(overdueBalance_40) = ( %Date() > dueDate );

maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum