Sometimes I find a problem and scratch my head and just cannot figure it out. I swear a lot. Then I discover the solution by climbing out of my little box, turning my head at a funny angle, squinting and thinking a bit differently. Then I swear even more.
I converted a column based piece of SQLRPGLE from this:
d S21uservalues... d e ds qualified d extname('APG05PHY')
dcl-ds S21uservalues qualified extname('APG05PHY') end-ds;
The SQL to read this looks like this:
exec SQL fetch next from cursorAPG05 into :S21uservalues;
and then it just will not compile!
Compile error is: SQL0312 30 798 Position 52 Variable S21STOCKROOMNAME not defined or not usable.
“But that is completely valid new free format RPG syntax” I scream at the compiler. /me then goes on to waste more time than I am prepared to admit trying every combination of code to figure out whats going on
The bloody DCL-DS statement is just too long and over-runs the available area into the //text area of this source member. Because I am using SEU (this client does not use any modern code editors and have blocked the ports to use RDi, Mi Workplace or even good old WDSC) the line is highlighted as in error – but I incorrectly assumed it was an error because SEU doesnt know about modern freeformat commands.
So, change it to a shorter and neater layout like this:
and boom it compiles and works.
Annoying — but obvious — once I figured it out anyway.
This wouldnt have been a problem if I had been coding correctly using **FREE
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd 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 in the words of the most interesting man in the world: Stay thirsty my friend.
Second Look: IBM RDi Extract Procedure Refactoring feature
Rational Developer for IBM i 9.6 Fixpack 7 is pretty pretty good
New Developerworks RDi website is ‘IBM Rational Developer for i Hub’
Developerworks Connections Sunset – How to Extend RDi
Why use IBM i RDi?
Edit UIM MENU with IBM i RDI
How to update RDi – Rational Developer for IBM ‘i’ Programmers
Free RPG Editor – ILEDITOR could be called RDi Lite ;)
RDi 9.6 from Evaluation to Licensed RDi Glory