130 pts.
 Change colour of RPG source header part?
Hi ,  I want to change colour of source in fallowing format.

RPG source header..

* Name -  ______________________  (wants marked line with greeen square box) 

* Text -  RPG first program header  (wants text colour in white instead of green)

 

ASKED: Jan 27, 2012  6:11 AM GMT
UPDATED: February 28, 2012  11:02:28 AM GMT
24,710 pts.

Answer Wiki:
Here are the HEX codes to change the color attributes


* x'20' __ __ __ __ __ Green
* x'21' __ __ __ __ RI |Green + Reversed
* x'22' __ __ __ HI __ +White
* x'23' __ __ __ HI RI +White + Reversed
* x'24' __ __ UL __ __ +Green + Underline
* x'25' __ __ UL __ RI
Green + Underline + Reversed
* x'26' __ __ UL HI __ _White + Underline
* x'27' -Nondisplay
* x'28' __ BL __ __ __ |Red
* x'29' __ BL __ __ RI -Red + Reversed
* x'2A' __ BL __ HI __ +Red + Blink
* x'2B' __ BL __ HI RI Red + Blink + Reversed
* x'2C' __ BL UL __ __ |Red + Underline
* x'2D' __ BL UL __ RI _Red + Underline + Reversed
* x'2E' __ BL UL HI __ _Red + Underline + Blink
* x'2F' -Nondisplay
* x'30' CS __ __ __ __ -Turqouise
* x'31' CS __ __ __ RI |Turqouise + Reversed
* x'32' CS __ __ HI __ _Yellow
* x'33' CS __ __ HI RI +Yellow + Reversed
* x'34' CS __ UL __ __ +Turqouise + Underline
* x'35' CS __ UL __ RI +Turqouise + Underline + Reversed
* x'36' CS __ UL HI __ |Yellow + Underline
* x'37' -Nondisplay
* x'38' CS BL __ __ __ |Pink
* x'39' CS BL __ __ RI -Pink + Reversed
* x'3A' CS BL __ HI __ +Blue
* x'3B' CS BL __ HI RI ?Blue + Reversed
* x'3C' CS BL UL __ __ (Pink + Underline
* x'3D' CS BL UN __ RI )Pink + Underline + Reversed
* x'3E' CS BL UL HI __ |Blue + Underline
* x'3F' -Nondisplay
Last Wiki Answer Submitted:  Jan 27, 2012  2:32 PM (GMT)  by  CharlieBrowne   24,710 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _




 

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

 36,410 pts.

 

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

 24,710 pts.

 

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

Phil

 36,410 pts.

 

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

 66,925 pts.

 

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

 36,410 pts.

 

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.

 5,320 pts.

 

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.

 3,000 pts.

 

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