comments in rpgile

25 pts.
Tags:
AS/400
RPGLE
How can i write my comments in colours ..... i have seen some code written by one of the indian company which has its comments with different colours like red,blue,white....
ASKED: July 24, 2009  5:17 AM
UPDATED: April 14, 2011  9:10 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

you have to map your keyboard with below color codes.

you just copy below code into one text file(Keyboardmap.txt) and save then map this text file with as400 session by follwing below instructions.

step1: Go to customize keyboard option on your as400 session.

step1: Go to file option on customize keyboard window and click on open tab then load this text file and click on save option on customize keyboard window.

now you are ready to do color any line in your code by giving following combination for different colors ‘Alt +W’ for whilte and so on…

you have to type Alt + W combination just left side to Specs

(Alt+W) D*Date_a s d inz(d’1997-01-31′)

even you can do copy by giving Ctl + C or paste by Ctl + V

Keyboardmap.txt

[Profile]
ID=KMP
Version=5
[KEYBOARD]
C-KEY20=’¹’
A-KEY20=apl 19
KEY43=[enter]
S-KEY43=[enter]
C-KEY43=[dead]
C-KEY47=[edit-cut]
C-KEY48=[edit-copy]
C-KEY49=[edit-paste]
C-KEY58=[edit-cut]
KEY64=[erase eof]
S-KEY64=[newline]
KEY108=[enter]
KEY110=
S-KEY110=[sys req]
A-KEY124=[sys req]
C-KEY18=apl 23 (Ctl-W = White Bkgd)
A-KEY18=apl 22 (Alt-W = White Font)
C-KEY20=apl 29 (Ctl-R = Red Bkgd)
A-KEY20=apl 28 (Alt-R = Red Font)
C-KEY21=apl 31 (Ctl-T = Turquoise Bkgd)
A-KEY21=apl 30 (Alt-T = Turquoise Font)
C-KEY22=apl 33 (Ctl-Y = Yellow Bkgd)
A-KEY22=apl 32 (Alt-Y = Yellow Font)
C-KEY26=apl 39 (Ctl-P = Pink Bkgd)
A-KEY26=apl 38 (Alt-P = Pink Font)
C-KEY35=apl 21 (Ctl-G = Green Bkgd)
A-KEY35=apl 20 (Alt-G = Green Font)
C-KEY50=apl 3b (Ctl-B = Blue Bkgd)
A-KEY50=apl 3a (Alt-B = Blue Font)
A-KEY43=apl 20 (Alt-Enter = Green Font)

if you still need any help feel free to contact.

Regards,
Mohan K

Discuss This Question: 10  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Yorkshireman
    Do some searching It used to be fashionable to write a code utility which assigns colours to given line types. You place the hex value for a given colour into the ine number field, Any number of programs available to download. - get one and read it. Heres some rexx which wil l generate a tableof colurs and values for you - use your own nbames for the library and file (and member if you want) use STRREXPRC or just put option 16 in PDM beside it "CRTSRCPF FILE(library/file) MBR(COLORS)" "OVRDBF FILE(STDOUT) TOFILE(library/file) MBR(COLORS)" Do I = 1 To 32 Say Right(indx || I, 4, 0 ) || 00000000 || D2C(I + 31)D2X (I + 31)D2C( 32) End
    5,520 pointsBadges:
    report
  • graybeard52
    Even better, forget about imbedding code, just use a newer code editor. IBM gives you RSE for no extra charge, it automatically colors the source, and gives you lots of additional options.
    3,115 pointsBadges:
    report
  • Yorkshireman
    I thought RSE was deprecated in favour of WDSC these days... (which is going to become chargeable, now they've moved us all off SEU. . )
    5,520 pointsBadges:
    report
  • WoodEngineer
    While working on a WDSc issue with IBM last week I asked, "What is the correct name - WDSc or RSE?" The support person sent this reply: "Usually we just refer to it as WDSC, the WebSphere Development Studio Client, but RSE works fine as well. RSE is a part of WDSC. There are other things you can do with WDSC, like WebFacing and Java programming as well."
    6,055 pointsBadges:
    report
  • Littlepd
    Yorkshireman, I think you're confused Code/400 and RSE. The Remote Systems Explorer (RSE) is a perspective within WDSc that allows the developer to connect to an IBM i server and edit source members using a graphical development environment.
    1,130 pointsBadges:
    report
  • WoodEngineer
    We had a programmer on staff who thought color coded source would really be neat. In his case, he added color based on the nesting levels of conditional code. It seemed kind of cool at first but later we found it was a much greater distraction than an advantage. We finally wrote a program to remove all the color coding. This kind of stuff rarely seems to have much use beyond the tenure of the person who developed it. As Graybeard52 recommends, just use RSE. In addition to adding color to your code it brings a lot of other great features which will speed up code development.
    6,055 pointsBadges:
    report
  • TomLiotta
    (which is going to become chargeable, now they’ve moved us all off SEU. . ) SEU is also chargeable, so you make a choice. we found it was a much greater distraction than an advantage. I ran into one of those last week. It's a little jarring and definitely distracting. I can see a use where a colored comment or two in maybe one out of ten programs would draw attention to something surprising, out of the ordinary or needing careful handling. It becomes overdone quickly (IMO). Tom
    125,585 pointsBadges:
    report
  • DanTheDane
    Forget all about putting in hex-codes to put color on your source-code; - if you do, you'll end up with code that you like, because you defined the style. Use a modern, graphical editor, which will color your statements on the fly, putting absolutely no extra coding into your statements. So, keep your code clean with no color-coding, and then use an editor which displays this clean code, with coloring. This way your code is clean, AND coloring is consequent, as it is based on the very program-code. DanF
    2,555 pointsBadges:
    report
  • Rpgile
    [...] comments in rpgile [...]
    0 pointsBadges:
    report
  • Rpgile
    [...] Comments in RPGILE [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following