indicators

pts.
Tags:
RPG
I have an RPG that uses alot of indicators for attributes like Position cursor and reverse image.How to effectively use these in a program instead of doing seton and setof everytime.I have come across arrays not sure if it can be used or can you suggest ways of making the program look much more structured.

Answer Wiki

Thanks. We'll let you know when a new response is added.

I haven’t got my references handy but there is a way to put the display file indicators into a data structure and then you can assign field names in RPG instead of *IN03 and the like. With the data structure you could create a named field overlaying 2,3,4 or more indicator positions and turn them on or off as a group.

Since the indicators are an array you may see the use of the MOVEA command
as in
MOVA ‘0000’ *IN30
which would turn to off indicators 30, 31, 32, and 33. Clever code like this is easy to overlook during maintenance so it maybe a bad model.

SETOF and SETON are I suppose in the deprecated list. Using
EVAL *IN57 = *on (or *off)
or in free format
*IN57 = *on

Some of the indicators need to appear in certain locations others can be moved to subroutines or procedures. Some appear in the clrSubFile routine to clear the subfile and set it in display mode.
Others can be cleared along when the clrSFLErrMsg in a routine.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following