Change colour of source code

Posted on 2000-01-28
Medium Priority
Last Modified: 2012-06-27
Just a quick one,
  I have taken responsibility for some RPG Source code and it has different colours on some of the lines, how do I do this, I have looked at manuals and I cannot see anything on how do this.

Question by:jetforce
  • 2
LVL 10

Accepted Solution

caraf_g earned 200 total points
ID: 2396366
It's easy enough but it requires a bit of trickery. Be careful though, what on your monitor looks like a nice shade of some colour or other, may be blinking on a monochrome monitor...


What you'll need to do is to read the source in with your own RPG program.

It's been a while, let me think.... in RPG, you'll have your HFELICO letters in position 6, right?

Anyway, effectively, that makes positions 1 to 5 comment lines. Putting anything there will not affect your code.

And here's the trick.... In position 5, put a control character. These range from hex(20) to hex(39) inclusive, and they define display attributes.

LVL 10

Expert Comment

ID: 2396386
"What you'll need to do is to read the source in with your own RPG program"

Sorry, vague... You'll need to write an rpg program that includes one of your source files (e.g. QRPGSRC) as an Update, Full procedural file.

Before you run your rpg program, you must override the file and the member to the one you want to modify.

Author Comment

ID: 2396871
I did a DSPPFM on some source code and I could see the control character.



Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Custom Android App Development is the need of an hour for several businesses. If you go through the right firm for Android Application Development, it can make a huge difference to the ways in which customers interact with your business.
Now many of you may wonder how you can reach great design with least number of essentials. Isn’t stuffing ‘more and more number of elements that speak for the purpose’ the right way to do it? Erm, not always, and in this write-up, you will see why.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Suggested Courses
Course of the Month7 days, 5 hours left to enroll

594 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question