Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Color lines in SEU?

3,828 views
Skip to first unread message

Kevin Buckley

unread,
Jul 21, 1999, 3:00:00 AM7/21/99
to
On looking at a client's RPG source code, we found comment lines that were
.. a different color. While in SEU, most of the lines are green, but some
of the comments are displaying as white. You can copy the white text, move
it, etc, but I can't turn green text into white.

How the heck did they do that?

-kb

SJ Lennon

unread,
Jul 21, 1999, 3:00:00 AM7/21/99
to
There is a hex attribute byte after the *. I don't like this feature
personally, but as I recall the values are X'21' thru X'27' for the various
colors/effects, You can experiement of check one of the manuals. And there
are a number of tools around that will convert a source file for you. If no
else volunteers info, check out the News/400 and Midrange Computing web
sites.

Sam

Kevin Buckley wrote in message <3796...@199.186.16.51>...

Craig Rutledge

unread,
Jul 21, 1999, 3:00:00 AM7/21/99
to
http://earth.vol.com/~craigr/jcrcmd2.html


There is a text file of the hex characters that make up the screen
attributes. SCRATR.


Kevin Buckley <Kevin_...@nothanks.com> wrote in message
news:3796...@199.186.16.51...

Thomas Raddatz

unread,
Jul 22, 1999, 3:00:00 AM7/22/99
to
Probably you are interested in downloading my freeware command FMTSRC
(Format Source Code) to color your source code, too.

Just click on the link below and follow the FREEWARE link, then.

Thomas Raddatz, Germany.

Kevin Buckley schrieb:


>
> On looking at a client's RPG source code, we found comment lines that were
> .. a different color. While in SEU, most of the lines are green, but some
> of the comments are displaying as white. You can copy the white text, move
> it, etc, but I can't turn green text into white.
>
> How the heck did they do that?
>
> -kb

--
*=====================================================*

e-mail Adresse:
Thomas....@Online-Club.de

Homepage:
http://www.online-club.de/~Thomas.Raddatz/

*=====================================================*


G. Bradley MacDonald

unread,
Jul 22, 1999, 3:00:00 AM7/22/99
to

Nice AS/400 Site. Peek/400 looks interesting too! What did you write it
in??

--
G. Bradley MacDonald
Delphi & AS/400 Consultant


Daniel Gross

unread,
Jul 22, 1999, 3:00:00 AM7/22/99
to
Kevin Buckley <Kevin_...@nothanks.com> schrieb:

> On looking at a client's RPG source code, we found comment lines that were
> .. a different color. While in SEU, most of the lines are green, but some
> of the comments are displaying as white. You can copy the white text,
move
> it, etc, but I can't turn green text into white.

Hi - I have written an exit program for SEU, which we use to make colored
comments and code line in our RPG (III + IV) code. I you want it, I can mail
you the source. The main part is adopted from the SEU reference manual, in
which the exit program technique for SEU is described.

To use it, you have to configure the exit program, and then use line
commands in the SEU to set the color or attribute for a line.

====> ________________________________
......*.............................
0001.00 * This is a comment
HI02.00 * and this will get the HI attribute
RED3.00 * but this will be RED when you press enter

The exit program has two types of command. The color commands (RED, BLU,
GRN, WHT, ...) will set/replace the attribute for a line. While the
attribute commands (HI, UL, BL, ...) are additive (you can use HI + UL). So
if you want to reset an (ugly?) colored line, you can simply use GRN to make
it green again.

I have some code formating and documetation tools which are using 2 or 3
bytes and the begin of the lines, so I have written the tool to use last
SPACE of the first continous SPACE block in a line (which is mostly the byte
directly before "C*"). Until now, support for block commands lacks, but I
will add it in the future.

Send an eMail to d...@in.rudolph-log.de when you want the (RPG IV) source.

Bye
Daniel


Thomas Raddatz

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to G. Bradley MacDonald
Peek/400 is written in ILE RPG. I wrote it because I needed an editor
that supports commitment control and in order to get handy with ILE RPG.

How about a nice pc-based Delphi/400 database editor? ;-)

Thomas Raddatz.


"G. Bradley MacDonald" schrieb:

--

Chuck Morehead

unread,
Jul 30, 1999, 3:00:00 AM7/30/99
to
They put hex color codes in the source. You cannot see them, i.e. they do
not take up a space, but they effect the color the rest of the
source line is displayed in.


Kevin Buckley wrote in message <3796...@199.186.16.51>...

>On looking at a client's RPG source code, we found comment lines that were
>.. a different color. While in SEU, most of the lines are green, but some
>of the comments are displaying as white. You can copy the white text, move
>it, etc, but I can't turn green text into white.
>

Tom Kennedy

unread,
Jul 31, 1999, 3:00:00 AM7/31/99
to
Correction - the hex characters do take up a space on the source line. On most
(?) dumb terminals these characters can be seen in test mode.

Craig Rutledge

unread,
Jul 31, 1999, 3:00:00 AM7/31/99
to
hex chart is at http://earth.vol.com/~craigr/scratr.txt.

Tom Kennedy <tom.k...@dial.pipex.com> wrote in message
news:37A26669...@dial.pipex.com...

Mahesha B R

unread,
Aug 6, 1999, 3:00:00 AM8/6/99
to
From,
Mohamed Riaz J( Mohamm...@bosch.com )

Halo,
Can you give an example to get a red color source line on the
source?.

Tom Kennedy wrote in message <37A26669...@dial.pipex.com>...

Peter R Rowley

unread,
Aug 6, 1999, 3:00:00 AM8/6/99
to
Hi there,

At the start of the field, you type in the hex character. For red it is
hex '28'

At the end of the field you need to put the end attribute, hex '20' to
switch the color off.

Peter

--------------------------------------


In article <7oecqs$cvj$1...@news.fr.internet.bosch.de>,

--
Peter R Rowley
Navan (UK) Limited

http://www.navan.co.uk


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Nick Downes (Software Projex)

unread,
Aug 6, 1999, 3:00:00 AM8/6/99
to
The Projex/400 toolkit contains a wide range of development tools for AS/400
professionals. One of these is SRTSRCMBR - Sort Source Member.

This command allows you to select the colour and case of comments in your
code, it numbers if/do loops, performs a cursory code upgrade (i.e.: END -
EndIF, EndDO, as applicable....and '1' becomes *On..etc...) it performs
functions for RPG, RPGLE, DSPF and PRTF, and lots of other useful little
tweaks to make reading code easier.

Its available for download from http://www.projex.com

Mahesha B R <mahes...@pcm.bosch.de> wrote in message
news:7oecqs$cvj$1...@news.fr.internet.bosch.de...

P.J. Hartman

unread,
Aug 6, 1999, 3:00:00 AM8/6/99
to
On Fri, 6 Aug 1999 15:44:43 +0530, "Mahesha B R"
<mahes...@pcm.bosch.de> wrote:

> Can you give an example to get a red color source line on the
>source?.

Red would be Hex code 29.


--
P.J. Hartman mailto:har...@tconl.com MIND THE GAP
The above guarantee does not cover shark bite,
bear attack, or children under the age of five.

Peter R Rowley

unread,
Aug 7, 1999, 3:00:00 AM8/7/99
to
Nope,

Red is hex 28

Red with reverse image is hex 29


In full, the list is as follows:

Hex Function

20 Green
21 Green/Reverse Image
22 White
23 White/Reverse Image
24 Green/Underscore
25 Green/Underscore,Reverse Image
26 White/Underscore
27 Non Display
28 Red
29 Red/Reverse Image
2A Red/Blink
2B Red/Reverse Image,Blink
2C Red/Underscore
2D Red/Underscore,Reverse Image
2E Red/Underscore,Blink
2F Non Display
30 Turquoise/Column Separators
31 Turquoise/Column Separators,Reverse Image
32 Yellow/Column Separators
33 Yellow/Column Separators,Reverse Image
34 Turquoise/Underscore
35 Turquoise/Underscore,Reverse Image
36 Yellow/Underscore
37 Non Display
38 Pink
39 Pink/Reverse Image
3A Blue
3B Blue/Reverse Image
3C Pink/Underscore
3D Pink/Underscore,Reverse Image
3E Blue/Underscore
3F Non Display

Note that Turquoise and Yellow have implied Column Separators in
colour.


Peter

---------------------------------

In article <37b8fda0...@enews.newsguy.com>,

--

Peter R Rowley

unread,
Aug 12, 1999, 3:00:00 AM8/12/99
to
I just got an email asking 'OK, but how do I edit the source member and put the
hex attributes in it?' I thought it was a worthy question that other people
might be asking, so I will reply here as well.

Well, the easiest way I have found is by using a database editor, like WRKDBF,
EDTDBF, DBU or something like that.

Create a 'work' source member in SEU and add a few lines of code.

Then go in to your database editor and open it.

Then edit that source member with your editor, in 'hex' mode. Put the start and
end attributes in the appropriate places in the source line you want to
'colorize'.

If you don't have a database editor, you can download WRKDBF as freeware from
http://www.wrkdbf.com

have fun!

Peter

-----------------------------

"Mahesha B R" <mahes...@pcm.bosch.de> wrote:

>From,
> Mohamed Riaz J( Mohamm...@bosch.com )
>
>Halo,

> Can you give an example to get a red color source line on the
>source?.
>

>Tom Kennedy wrote in message <37A26669...@dial.pipex.com>...
>>Correction - the hex characters do take up a space on the source line. On
>most
>>(?) dumb terminals these characters can be seen in test mode.
>>
>>Chuck Morehead wrote:
>>
>>> They put hex color codes in the source. You cannot see them, i.e. they
>do
>>> not take up a space, but they effect the color the rest of the
>>> source line is displayed in.
>>
>

--

Kevin Buckley

unread,
Aug 12, 1999, 3:00:00 AM8/12/99
to
I received a good answer to the color lines question outside the newsgroup.
Unfortunately, I do not know the full name of the wise one to attribute the
solution, other than to say his first name is Brian. Thanks, Brian.

It works really slick, if you have Client Access, or some other way of
mapping the keyboard thusly. It's nice to highlight code with colors, but
also cool to highlight the text description of members with colors,
depending on status.

-kb

-----------------------------------
If you are using the IBM Client Access emulator, you can
program the keyboard to enter the colors. Here's how
(these directions are specifically for Client Access
Express, but I think they will work in a similar way for
all of the IBM emulators).

1) Choose menu option Assist==>Keyboard Setup.
2) Click User-Defined on the dialogue box.
3) Click the Customize button.
4) Click on a keyboard key (let's use W).
5) Choose a key combination to enter the hex codes. Example:
a) Next to Ctrl, key "apl 26" (no quotes)
Ctl+W will insert a white underline hex byte
b) Next to Alt, key "apl 22" (no quotes)
Alt+W will insert a white hex byte
c) Next to CtrlShift, key "apl 23" (no quotes)
Ctl+Shft+W will insert a white reverse-image hex byte
6) For each of the colors desired, choose a different key
(the first letter of each color works nicely) and enter the
hex codes for that color. Here is a table of hex codes (in
RPG constants format!).

D cBLU C CONST(X'3A')
D cGRN C CONST(X'20')
D cPNK C CONST(X'38')
D cRED C CONST(X'28')
D cTRQ C CONST(X'30')
D cWHT C CONST(X'22')
D cYLW C CONST(X'32')
D cBLU_RI C CONST(X'3B')
D cGRN_RI C CONST(X'21')
D cPNK_RI C CONST(X'39')
D cRED_RI C CONST(X'29')
D cTRQ_RI C CONST(X'31')
D cWHT_RI C CONST(X'23')
D cYLW_RI C CONST(X'33')
D cBLU_UL C CONST(X'3E')
D cGRN_UL C CONST(X'24')
D cPNK_UL C CONST(X'3C')
D cRED_UL C CONST(X'2C')
D cTRQ_UL C CONST(X'34')
D cWHT_UL C CONST(X'26')
D cYLW_UL C CONST(X'36')

7) Choose File==>Save to update the keyboard profile.

Note that you can also use this trick to highlight comments
in different colors (even within the same line) and you can
update object and member descriptions in PDM with these
colors. We even use different colors to mark different
members as to their status (e.g., blue=member needs to be
updated, turquoise=member needs to be tested, pink=problem
with code change, etc.).

Hope this helps you. Have a great day!
Brian


Charles R. Pence

unread,
Aug 12, 1999, 3:00:00 AM8/12/99
to
Kevin Buckley wrote:
> <<SNIP>> colors (even within the same line) and you can

> update object and member descriptions in PDM with these
> colors. We even use different colors to mark different
> members as to their status (e.g., blue=member needs to be
> updated, turquoise=member needs to be tested, pink=problem
> with code change, etc.).
>
> Hope this helps you. Have a great day!
> Brian

Of course not all interfaces will support these attributes; some may scan/replace characters less than x/40 with x/40. I seem to remember UIM used to do that, so I am surprised to read that PDM does that.

Regards, Chuck
All comments provided "as is" with no warranties of any kind whatsoever.

0 new messages