RPG Code Hints and Tips – using slash Title Mainline

Submitted by NickLitten on Wed, 04/20/2011 - 09:16

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.

rpg programming help

But wait, I stumbled across a neat little code snipper 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.

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; 


Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Some Bloke

Projex dot com is the cyber home of Nick Litten an AS400 IBMi developer, RPG programmer, SOA code enthusiast, website tinkerer, information technology evangelist, early adopter, proponent of open source and hopeless technology addict...

Nick Litten looking dazed while refactoring some RPG2 code to kick it into this century

Born and raised in Rainy England, now enjoying programming in the sunshine of Southern USA. Founder of SOFTWARE PROJEX.

Clustermap

Locations of visitors to this page

glqxz9283 sfy39587stf02 mnesdcuix8
sfy39587stf03
sfy39587stf04