Q. I would like to change the attributes of various fields on my screen through the RPG program. Is there a way to do this? All this time I was defining my fields in the display file with different indicators related to different attributes, and then I change the indicators on/off in my RPG program. This method seems too cumbersome, especially when there are lots of fields on the screen. Is there another way to do this?
A. You could append an attribute byte to the beginning of any output field that you want to use special attributes on. You would also need to append an attribute byte at the end of the field to set the attributes back to normal. These derived output fields would have to be two bytes larger than the data (one byte for the beginning attribute and one byte for the ending attribute). If you use this method, you may want to create an array where each element represents a line on the screen and load the array element with each field and its attributes.
LATEST COMMENTS
MC Press Online