.st0{fill:#FFFFFF;}

IBM CL Control Language Layout with RDi Rational Developer 

 October 17, 2017

By  NickLitten

I was happily editing some CLP code in RDi and very pleased with the Rational Developers automatic code reformatting: stretching out my Control Language code to fit the screen neatly. This is a nice enhancement to the code editing experience and blows the trusty old SEU workhorse out of the water….

I like how it stretches my code out beyond the 80 columns of SEU… until I try to look at it using SEU and then realize it’s chopped off the end. But it looks OK in RDi… but chopped in SEU… #aaargh

Here’s what it looks like in RDi:

IBM CL Control Language Layout with RDi Rational Developer 1

But in SEU it’s chopped off:

IBM CL Control Language Layout with RDi Rational Developer 2

Luckily RDi has a nice easy solution, which lets us overcome this limitation of the Stone-age Editing Utility.

Setting column widths in RDi

Windows > Preferences > Remote Systems > Remote Systems LPEX Editor > IBM i Parsers > CL

IBM CL Control Language Layout with RDi Rational Developer 3

So lets do some tweaking!

I played with it and like these settings the best:

  • Automatic Uppercasing *OFF
  • Automatic Indent – Blanks 3
  • Automatic formatting
  •   Label Position 1
  •   Command Position 5
  •   Continued Line Indent 14
  • Line Length 100 (I prefer it longer but this solves my problem with Turnover #CestLaVie)
  • Label above command

For today at least šŸ™‚

IBM CL Control Language Layout with RDi Rational Developer 4

Now I can just run down the source typing a space (into a space) so it’s flagged as changed and the RDi parser re-sorts and aligns the code for me. In this case ending up like this:

IBM CL Control Language Layout with RDi Rational Developer 5

Neat code in a Jiffy.

HINT: if you make layout changes they are only applied when a line is changed. So, do a SELECT ALL (CTRL/A) and then a CUT/PASTE on the entire source member you will immediately see the code in the new reformatted layout šŸ™‚

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
    __CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

    Get In Touch

    Iā€™m always looking for awesome input, feedback and critique!

    >