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

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

Name the Indicators - Tip3

Go down

Name the Indicators - Tip3

Post  maran on 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


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


Posts : 442
Join date : 2009-07-24

View user profile

Back to top Go down

Back to top

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