Hi Chuck
I've only ever seen scripts, etc for Client Access, but you do have a couple of things you can do.
First option is to create a source member called "colour" or something and then use a file editor, e.g. WRKDBF, etc, which to edit the member. The important thing is that the file editor allows you to enter in "hex" mode.
Add records with the hex codes for the colour attributes you want and then use SEU to copy and overlay these records in the source member you want highlighting. This method works best for highlighting comments in RPG programs, for example, where you can put the code in column 8 for all records.
If you don't have a file editor you can write a quick program to create the source member.
If it's RPG code you want highlighting specifically - different colours for condition statements, variables, etc - sort of like the PC based IDE's - then there is a tool RPG Alive (www.rpgalive.com) which does on the fly code highlighting. I installed it at a previous job around 5-6 years ago and it was about #1000 for a site licence. Not sure what the price is these days, but it's well worth the investment.
Hope it helps
Jonathan
==================================================
However you do it, it's wrong. Hex codes are not valid in source members nor should they be entered.
Sooner or later, you will need to process those source members on a different system. Perhaps you'll have a development LPAR or perhaps you'll use a decent PC editor such as WDSC or RDi which will do it automatically for you. It <b>will</b> happen.
When it does, you are not going to want to clean up all of your source members to find and remove all of the control codes that never should have been there. Sending various hex codes in network transmissions can really mess things up, especially when they're not supposed to be there.
Tom
Thanks for the input. That’s exactly the way we do it today…copy source from other programs that’s already hilighted. Years ago, I wrote a program like you described to generate the attributte bytes.
I’m still hoping to find a way to do it directly.
Hi
I literally stumbled over this site (http://www.geocities.com/SiliconValley/Pines/5581/tips.htm) and remembered your question.
There’s a utility here called SEU Magic that makes use of the user-defined F7 and F8 keys to add colour attributes at the cursor location.
I haven’t tried it because I tend to use Client Access with colours mapped to Ctrl key combinations, but the source looks straight forward enough.
Anyway, I hope it helps.
All the best
Jonathan
There is a sample program here that may help:
http://search400.techtarget.com/news/article/0,289142,sid3_gci865279,00.html#
You might also try a google search for a progam called CHGCOLOR. It allows you to change the color of a comment line using function keys F7 and F8.
Quite a while ago one of our developers used a utility to add color based on IF/End combinations. The utility inserted the hex code for the various display attributes in position 5 of the RPG source. At first this looked pretty cool. Over time that developer left, the programs were modified and the colors were not maintained. Needless to say, the colors soon become an annoyance, rather than a help. Some of the colors are a bit difficult to read. I finally developed a procedure to remove the colors.
Based on our experience, I recommend proceeding slowly with this to be sure you like the results.
IMO, Go with Tom’s answer. The lpex editor in WDSC colors the text automagically, and gives you a host of other features. As of V5R4 its still a no additional cost feature. the colors are customizable to each user.