|
|
All AS/400 Tip Categories
/
AS/400 Programming
/
Can you highlight code in SEU?
Question:
Does anybody know how I can high light a line of code or comment in my RPG
source we I am editing it with SEU?
Answer(s):
Are you interested in causing specific lines of source to appear highlighted
when you view the member in SEU? or do you want the current line to be
automatically highlighted whenever you edit it?
For the first, you can imbed the hex value for the display attribute
(highlight, blink, underline, color, etc.) directly in the source statement.
I do that by copying it in from another member. I have a source member named
COLORS that has one line for each attribute that I want. I copy the line that
I want into the member I'm editting and type over it. (I originally created
this member by doing STRCPYSCN to an outfile while viewing various panels
that had different display attributes on different fields -- STRCPYSCN
includes attribute bytes in the output. You can then get that file into a
source member and edit it to arrange things as you like. Not very high-tech,
but it was simple.)
For the second, you'll either need to install something other than SEU to do
your editting or rely on the facility that SEU provides. SEU will highlight
the line number if you place the cursor on a line and press .
Essentially, SEU shows you the line that you just changed, not the one that
you're changing 'now' (which I thought was what you asked for). As far as I
know, highlighting the line number is as far as it goes for SEU.
There was a program in the November 1993 of NEWS/400 magazine called "SEU in Colors". This is parm driven and can be modified.
Alternately, you can use DBU in Hex mode (f9 multiple record display) to enter hex codes for source color.
You must write hexadecimal value '22' on 5th position
of the command RPG line.
You cannot do it from within SEU, you have to write a program that reads a
source file and inserts hex code 22 before the text that you wish to
highlight.
Use the BITON/BITOFF command to setup the hex field and insert it at the
begining of the text that you want to highlight. Once you have got one
highlighted line you can copy it on from within SEU.
Looks quite pretty for comment lines (but it's not to everyones taste)
The attribute byte that does highlighting can't be entered on the keyboard,
so you'll need another way. One option is to use a program that does it
for you (for example on all comment lines), or copy a line with the
attribute byte from another source (that way you can use Copy-Overlay in SEU).
The best way to do this, you must insert the hexadecimal code for
highlight, underlined an so on.
You have a Byte that contains 8 Bits.
Bit 0 = 1
Bit 1 = 2
Bit 2 = 4
Bit 3 = 8
Bit 4 = 16
Bit 5 = 32
Bit 6 = 64
Bit 7 = 128
------------
255 this is the maximum of one Byte
The following table show you, which bit you must activate for the
attributes:
Display : BIT 5 = Hex : 20
Highlighted : BIT 5 + BIT 1 = HEX : 22
Underlined : BIT 5 + BIT 2 = HEX : 24
Reversed : BIT 5 + BIT 0 = HEX : 21
Blinked : BIT 5 + BIT 3 = HEX : 28
Seperator : BIT 5 + BIT 4 = HEX : 30
NonDisplay : BIT 5 + BIT 0 + BIT 1 + BIT 3 = HEX : 27
You can combine this BITS. An example you want to show a string between a field "underlined and highlighted" the you must combine the following
BITS:
BIT 5 + BIT 1 + BIT 2 = DEC = 32 + 2 + 4 = 38 , HEX = 26
Also you must move X'26' to the field position. And at the end you must
set only the BIT 5.
<vogt@softship.de, via email, 1/2000>
Other tips in this category:
Click here to see all categories.
Socket Programming And Timeout Issues
Deleting Duplicate Records From A Table
What are data queues and how to use
Retrieving SMTP Name
RPGLE example for Dynamic Screen Manager API
Calling APIs from CL - with examples!
Compare two strings in RPG character by character
How to search all pgms in QCLSRC for a keyword
Retrieve Database File Description (QDBRTVFD) API
How to redirect the output to STDERR from RPG-IV
Using Multiformat Logical To Join 2 Identical File
D-Spec *LIKE DEFN
RPG: Converting Character to Decimal
Example of ILE RPG CGI Program
Handling ILE RPG Numeric Overflow
Help with Subfile Programming in RPG III
Zoned parameter in ILE RPG
What's the best way to do modulus in CL?
RPG Nesting Source Print Utility
More on changing the SIGNON screen
A silly ILE RPG question
Calling Validation List API From ILE RPG
Soft Coding Module Names
RPG Multidimensional Arrays in Action
Build a Page-Equals-Size Lookup Window
Procedures within an ILE RPG program
Break msg from RPG
Source Debugger for batch jobs
RPGLE debugging
Timing out display sessions in DDS
Building Dynamic Stored Procedures
Put Message in System Log
Dynamic RPGSQL
Randomize function for the AS/400
What's the fastest way to do a simple RPG lookup?
First time Data queue application in RPG
Print file overflow in ILE RPG
Mapping Fields To Arrays in ILE RPG
Named inidicators
STRQMQRY: comparision operator '=' isn't correct?!
DSPDTAARA to an outfile - possible?
PCL ESC codes in RPG
Sharing DB files between two AS/400s
Help: AS/400 subfiles
How do you change the signon screen?
Determining Even/Odd Values in queries
Get day of the week in RPG
Convert UPPERCASE to lowercase
RPG IV help using APIs
Help with data area API
Detecing IFS Files from RPG
SQL in a CL program
Calling AS/400 APIs from ILE RPG
CVTDAT command to convert an *MDY to a *LONGJUL
CPYSPLF Automation
Subfile Window background problem
Using IFS APIs w/ ILE RPG
Packed or unpacked fields?
QRYDFN to source and back
What does the "optimize" parm do?
Determining the calling program
Sockets in RPG?
Sorting a user space
OVRDBF and SECURE() keyword in an ILE environment
RPG record locking
RPG Differences: V2R3 to V3R2 upgrade
Getting the relative record number (RRN)
What is the longest parameter usable in RPG?
A C function that returns a string to an RPG pgm
Problems with ZADD *ZEROS
Can you highlight code in SEU?
Reusing deleted records - OK?
Is there an easy way to change edit codes?
Help - Windowed Subfiles
Logical Files and DDS
AS/400 'machine language' - MI Programming
Library lists and performance
How to use ERRSFL
Updating in CL
Record lock wait time
Message subfile problem
Physical File Joins
CL: Copying User Profiles
Commands and PARM
ILE RPG, RPG IV, vs. RPG/400
RPG and subfiles
Multiple subfiles
Field masking for passwords
SFLMODE keyword in an ILE program
Subfile size
Color coding records in a subfile
MSGLINE in windows
Controlling cursor movement on a display file
API returns error! Why?
Put an RPG Program on the Web
Variable length records in RPG
Differences Between RPG400, RPG IV, and ILE RPG
|