
You can use the
COLOR keyword on the dsplay file
COLOR(RED)
Colors are BLU GRN PNK RED TRQ WHT YLW
and Display attributes are
DSPATR(RI) <– reverse image box of reverse color
DSPATR(UL) underline
DSPATR(RI UL) <— both
Notes: 1. Not all combinations work
2. Changes in Client colors can effect results
Phil

Phil
To not confuse the issue, I beleive he was asking about doing this in his RPG Source member.
Your suggestion would only work in for a DSPF not RPG Source

Right .. perhaps ..
.
You had provided a factual answer and I should have
- recognized the quality of your answer
- reminded that another option exists.
Phil

I would add “Don’t do it.” Putting hex codes into source is how colors are introduced, so the question is answered correctly. But putting non-text characters into source can bring future difficulties when it’s necessary to work with that source on a different system such as on a PC.
Transferring source to another system (even another AS/400, possibly even the same AS/400 if CCSID or related system changes are made) can result in unpredictable changes to the characters. I’ve had to clean up such messes before. You just never know what’s going to happen with source a couple years later. It’s the kind of delay that you don’t want happening in the middle of a migration project.
If color is needed, then use WDSC (or RAD or whatever name it is, or even a different editor that automatically colors code).
If emphasis is needed, then simply structure the comments so they’re blocked by rows of hyphens or asterisks or whatever.
Source is defined as text characters. Putting hex values into it that do not translate as text is potential trouble.
Tom

Sorry Charlie
All I can say about my responses– from Lost in Space..
“Dr. Smith: [to Robot] You bubble-headed booby! You realize what you’ve done? ”
Phil

I’ll echo Tom’s comments.
most especially with the fading of SEU and its use of 5250 emulation, insertion of a screen field control is a Bad Idea.
Whiole SEU lasts though, there are plenty of routines on t’internet for doing this.
be sure you also write a ‘removal’ facility though.
And none of this applies when you print source for desk checking (does anyone still do that) - all colours are black.

Another advantage of using WDSC / RDi isthat the source itself doesn’t get changed, each user can have their own colors, and it can print in color.

[...] 7. TomLiotta and CharlieBrown solves how to change the RPG source header color. [...]



















