Problem solve Get help with specific problems with your technologies, process and projects.

Highlight source files from your keyboard

Highlighting source code with 5250 display attributes can improve readability and help to focus one's attention on what is going on in the program.�Most programmers are unaware that code may be highlighted without using a purchased or homegrown utlity.�While these are useful (I wrote one of the latter for myself), the highlighting effect can be extended by embedding display attributes directly from your keyboard.�Using the CA/400 Customize Keyboard function, which may be accessed via menu option Assist | Keyboard Setup... | Customize, or the toolbar button (if enabled), you can assign values of "apl xx" (don't include the quotes) to any valid key combination, where "xx" is a hexadecimal value.� The complete set of valid 5250 display attribute codes are shown below.

When highlighting a source member, remember to place the attibutes into an area of the source line that will not cause a syntax or compile-time error, such as columns ont to five of any RPG specification.

Code: 20 Green
21 Green RI
22 White
23 White RI
24 Green UL
25 Green RI UL
26 White UL
27 Non-display
28 Red
29 Red RI
2A Red BL
2B Red BL RI
2C Red UL
2D Red RI UL
2E Red BL UL
2F Non-display
30 Turq CS
31 Turq CS RI
32 Yellow CS
33 Yellow CS RI
34 Turq CS UL
35 Turq CS RI UL
36 Yellow CS UL
37 Non-display
38 Pink
39 Pink RI
3A Blue
3B Blue RI
3C Pink UL
3D Pink RI UL
3E Blue UL
3F Non-display

Dig Deeper on RPG iSeries programming