.st0{fill:#FFFFFF;}

RPG Code Hints and Tips – using slash Title Mainline 

 April 20, 2011

By  NickLitten

I’m in the middle of refactoring a load of old Projex400 RPG code from RPG3 upto RPG4 and using all the modern BIF’s. It’s a fun thing to do in the evening while I’m hiding in an hotel room in rainy Ohio. But I digress… Inevitably my first compile will fail and I normally want to jump to the ‘C’ specs to have a look at what I’ve got wrong… this normally involves repeatedly pressin the page-down key until my finger tip gets numb.

But wait, I stumbled across a neat little code snippet that saves time and looks good in the code as well.

Use the /title command in the source code to add a comment to your spool file listing

RPG Code Hints and Tips – using slash Title Mainline 1

This was used a lot in the old days of programming along with the /page and /eject codes.

I have started using the ‘/title mainline’ as the first line of ‘c’ specs in RPG4/Column-Based, or just before the /FREE in RPG4/FreeFormat.

Why?

Because when you are quickly compiling and looking at the spool file it makes jumping to the first line of the mainline calculations a doddle. Just search for ‘mainline’ while viewing your spool file of the (failed 😉 ) compile and *voila*

Handy_timesaving_tip = number_493
*inlr = *on;

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!

>