Archive

Archive for May, 2010

RPG and Programming › Bugged by the Debugger- and Larger Issues

May 31st, 2010 Comments off

Sometimes the frustration you get from programming stems from a lack of knowledge. You think you have a mastery of a particular programming task, but the lack of knowledge comes back to bite you.

Such was the case a few weeks ago. I was debugging a program, and I wanted to to check the results of a basic calculation. I had changed the processing to no longer use a particular field. This field was defined in the input specifications (it was not externally defined). As I stepped through the calculations, I wanted to check the field, so on the command line I entered EVAL FIELD1. The result? It was blank.

I said to myself, “This is ridiculous- it can’t be!” It was part of the key to the file, and the file had no blank keys. I checked the value of KEY1, which included FIELD1 (that is, it included the data in the record encompassed by FIELD1. It looked normal. This was exasperating. I know that data in input specifications are stored in different areas of memory, even if they describe the same spot in the data record. But the field was blank. There were other fields that encompassed the same record space; some were blank, some weren’t.

I was vaguely aware that there was some sort of keyword in the H specifications you could use to eliminate unreferenced fields. But that would mean that I shouldn’t be able to debug it at all; it should give an error if I tried to EVAL it. And I didn’t use that keyword. I had one of my fellow programmers look over my shoulder as I ran the program in debug again. He didn’t have any idea what was going on either.

After all of this, we brainstormed a bit. I had no reason to suspect it before, but we thought: what if it is not showing up in debug because it is not being used? We could find nothing in the IBM RPG language documentation that something like that is done; but I inserted a dummy calculation: EVAL FIELD1=FIELD1.

Voila! The field now showed up, filled with data, in debug.

The most disagreeable part of it all was that I couldn’t find this behavior described anywhere in the documentation. I spent a little time Googling the situation – and sure enough, others described this behavior of the debugger. Apparently it is some kind of attempt to optimize the debugger. If you don’t use the field, the value is not filled in the debugger.

My reaction was, “Why bother?” Why assume that, just because another line of code doesn’t reference it, that I’m not interested in it? (This is an old program, by the way.) If the field is part of the file’s definition, it should be assumed that I’m interested in its value. I haven’t been able to find the documentation in a text document that describes how to use the debugger. The documentation may say something about it – if there is documentation. I couldn’t find anything in the help text for the debugger that described my situation. And I would think that a debugger, which deliberately allows you to sit at a line of code as long as you want, would be the last and least thing you would need to have optimized.

But all of this speaks to a larger issue. Is this system getting too big? Is there any person around that actually knows everything about the behavior of the RPGIV compiler and its supporting programs, like the debugger? I don’t mean someone who knows where to look for the information (assuming of course that it’s even all written down), but someone who actually knows all this stuff, right down into all of the nooks and crannies, like this thing with the debugger, where some programmer or low-level committee apparently arbitrarily decided that we didn’t need to see the value of an unreferenced field in the debugger? If such a person exists, hide him from the world for six months and make him update the manuals so they include everything IN A COMPREHENSIBLE AND COMPREHENSIVE FORMAT.

I don’t pretend to know the answers to these questions. I don’t pretend to know the solutions to these problems. Maybe I’m just stupid. Maybe I just don’t know where to look. But I have for some time labored under the delusion that I have some measurable level of intelligence and that it shouldn’t be this hard to figure these things out.

This is a rant without a suggested solution. I can’t write my own compiler or supporting documentation. But it just strikes me that when Niklaus Wirth and a colleague can write a non-trivial graphical operating system (Oberon) in just over 12000 lines of code in under 200K of space, other people just as smart could make these systems we work with (possibly) smaller and (certainly) more comprehensible. Maybe it’s too late. I hope not.


Read the original at RPG and Programming.

Categories: Blogs Tags: , ,

Pete's Wordshop › A little Linux success

May 26th, 2010 Comments off

After ranting about how difficult it was to install Linux on the blade (vs IBM i), I was hoping I’d get some quick resolution.  However, the scenario ended up like this:

The VIOS folks tossed it over the wall to the Linux folks.

The Linux folks determined that I did NOT have a support agreement for Linux on the blade.  They closed the call.

I reopened the call, arguing that the problem manifested itself when using the terminal window to install Linux but the terminal window, being a part of VIOS (IVM) would be part of a supported product.

Silence.

I then, through trial and error, determined it to be a Firefox issue.  I *could* install with IE8 but not with FF.  I reported this back to IBM expecting that they would proceed with determining the cause of the incompatibility and get it fixed.  Au Contraire!  Browser incompatibilities are not part of the mission of IBM support so they closed the call.

I did pick up this tidbit though, and I document it here so I can find it again: You can start the terminal for a given partition in VIOS by issuing the mkvt -ID X command  from the command line where X is the number of the partition.  To exit the partition terminal use the key combination ENTER, ~, . (period).   Whether the VIOS terminal is running in the “Remote Control” window from the AMM or from Telnet or SSH, the commands work.  So now I have a workaround.

I was able to finally get the SLES 11 Linux (PPC64)  partition running and accessible from VNC using a technique found at the Novell site where I posted. Read it all the way through.  The solution is posted at the end of the link in the post: http://forums.novell.com/novell-product-support-forums/suse-linux-enterprise-server-sles/sles-configure-administer/373530-sles-11-vnc-issue-no-desktop-just-gray.html

So that gets Linux (SLES 11 PPC64)  running again.  Now if I can get WAS 7 going on my i, the software application installation challenges for the week are done.


Read the original at Pete's Wordshop.

Categories: Blogs Tags: , , , , , , ,

RPG Next Gen › RPG Next Gen Editor Dev Snapshot 0.5.3.99 released

May 24th, 2010 Comments off
There is a new development snapshot on Sourceforge.net. You'll find it in the Files section under rpgng -> rpgng-devel. Currently it is a linux only release. I hadn't had the time to make a full release with the headless build yet. The major change/new feature is the access to the IFS. There is a new view, IFS Explorer. It will work with your previously created connections. You can browse the IFS via this view and edit files. Files will be opened with the default editor. If no default editor is configured it will switch to the default text editor. I would like to hear/read your feedback. Have some fun.


Read the original at RPG Next Gen.

Categories: Blogs Tags:

RPG Next Gen › RPG Next Gen Editor Dev Snapshot 0.5.3.99 released

May 24th, 2010 Comments off
There is a new development snapshot on Sourceforge.net. You'll find it in the Files section under rpgng -> rpgng-devel. Currently it is a linux only release. I hadn't had the time to make a full release with the headless build yet. The major change/new feature is the access to the IFS. There is a new view, IFS Explorer. It will work with your previously created connections. You can browse the IFS via this view and edit files. Files will be opened with the default editor. If no default editor is configured it will switch to the default text editor. I would like to hear/read your feedback. Have some fun.


Read the original at RPG Next Gen.

Categories: Uncategorized Tags:

RPG Next Gen › RPG Next Gen Editor Dev Snapshot 0.5.3.99 released

May 24th, 2010 Comments off
There is a new development snapshot on Sourceforge.net. You'll find it in the Files section under rpgng -> rpgng-devel. Currently it is a linux only release. I hadn't had the time to make a full release with the headless build yet. The major change/new feature is the access to the IFS. There is a new view, IFS Explorer. It will work with your previously created connections. You can browse the IFS via this view and edit files. Files will be opened with the default editor. If no default editor is configured it will switch to the default text editor. I would like to hear/read your feedback. Have some fun.


Read the original at RPG Next Gen.

Categories: Blogs Tags:

Bob Cancilla on IBM i › PHP and IBM i or any other Computer System

May 18th, 2010 Comments off
I've been around since before PHP was invented.  I was a big advocate of IBM's Net.Data macro language (which I still think is better than PHP in many ways),  Many of you know that I was a huge advocate of IBM Rational's EGL (Enterprise Generation Language) and convinced quite a number of iSeries customers and software vendors to utilize it. 

I do think that EGL and Net.Data are excellent web development tools, but I did not fully appreciate PHP until I had to create my own low budget web site.  I subscribed to Network Solutions (the original domain name registry company) who now sells hosting on UNIX systems for as little as $12.00 per month.  I happen to like Network Solutions for old times sake (they were the original domain name registry), but there are several other hosting services now including GODADDY.COM who offer very inexpensive web hosting.  There are now many other hosting services including Yahoo, Google, and many, many others.  Prices start at about $10 per month and increase from there.  You can have a pretty robust web site with lots of activity for less than $100 per month.

Well, "web hosting" -- in the old days this was the ability to upload static HTML pages to a server somewhere and have a simple HTML only web site.  Today I noticed that PHP is standard on all of these sites.  Not only is PHP standard, but so is MySQL as a database engine. 

So what did I need?  I needed a simple feedback form that asked for name, address, email, and telephone number.  I wanted to send an email the person entering their data confirming that we got it and would get back to them, and write the data to the database.  I also wanted a simple query that I could run to download data from the database as a CSV File for use in an Excel spreadsheet. 

I thought OH HECK (or some other words) I have to learn PHP and MySQL!  Well, actually I did and I didn't.  I found tons of sample apps that did what I wanted to do from form editing with AJAX.  I found an example that showed me how to send an email, and I found several examples of code for MySQL ranging from an INSERT with Database Validation to a query that formats the output into CSV format. 

During the process which took about 12 hours spread over 3 days I pretty much learned PHP.  If you know any programming language (like Java, Basic, or JavaScript) you know PHP.  The language adheres to modern best practices in terms of language syntax and punctuation.  A good knowledge of HTML is also very helpful and some basic Internet tools knowledge like a little bit about email servers, etc.

Bottom line 3 days and my application was working.

So PHP and MySQL are easy to use.  Is that a reason to use them?  Nope!  There are other easy to use tools.  What makes PHP and MySQL so dynamite is the fact that they are totally pervasive everywhere.   Additionally there is a vast library of free applications, utilities, etc. out there on the Internet for free.  Stuff written in PHP and MySQL's SQL dialect is 100% portable to any platform that runs PHP and MySQL. 

Isn't interesting that IBM advocates PHP over their own proprietary languages and technologies?  IBM is the leading company funding the open source community.  Zend is a huge business partner and PHP counters many proprietary Microsoft offerings.  It also counters several proprietary Adobe offerings.

Folks I was totally stunned when I found out I had a very large disk allocation, MySQL, and PHP on a $12 per month hosted web site!  Think about the implications of this.  PHP and MySQL are everywhere.  They are free for the download and they exist on cheap hosted servers.  You can implement SOA components and interoperate on a cheap standalone server with any other server.

TWELVE DOLLARS PER MONTH!  Compare that to the thousands you are spending and that I have spent in my previous life.  Consider also that if you can learn JavaScript or Basic you can learn PHP! In other words "cheap labor". 

I certainly liked many of the features of EGL and Java but you cannot beat PHP for quick easy to use robust and scalable web applications.  Took me a while but I finally GET IT! 

Bob C.



Read the original at Bob Cancilla on IBM i.

Categories: Blogs Tags:

Bob Cancilla on IBM i › PHP and IBM i or any other Computer System

May 18th, 2010 Comments off
I've been around since before PHP was invented.  I was a big advocate of IBM's Net.Data macro language (which I still think is better than PHP in many ways),  Many of you know that I was a huge advocate of IBM Rational's EGL (Enterprise Generation Language) and convinced quite a number of iSeries customers and software vendors to utilize it. 

I do think that EGL and Net.Data are excellent web development tools, but I did not fully appreciate PHP until I had to create my own low budget web site.  I subscribed to Network Solutions (the original domain name registry company) who now sells hosting on UNIX systems for as little as $12.00 per month.  I happen to like Network Solutions for old times sake (they were the original domain name registry), but there are several other hosting services now including GODADDY.COM who offer very inexpensive web hosting.  There are now many other hosting services including Yahoo, Google, and many, many others.  Prices start at about $10 per month and increase from there.  You can have a pretty robust web site with lots of activity for less than $100 per month.

Well, "web hosting" -- in the old days this was the ability to upload static HTML pages to a server somewhere and have a simple HTML only web site.  Today I noticed that PHP is standard on all of these sites.  Not only is PHP standard, but so is MySQL as a database engine. 

So what did I need?  I needed a simple feedback form that asked for name, address, email, and telephone number.  I wanted to send an email the person entering their data confirming that we got it and would get back to them, and write the data to the database.  I also wanted a simple query that I could run to download data from the database as a CSV File for use in an Excel spreadsheet. 

I thought OH HECK (or some other words) I have to learn PHP and MySQL!  Well, actually I did and I didn't.  I found tons of sample apps that did what I wanted to do from form editing with AJAX.  I found an example that showed me how to send an email, and I found several examples of code for MySQL ranging from an INSERT with Database Validation to a query that formats the output into CSV format. 

During the process which took about 12 hours spread over 3 days I pretty much learned PHP.  If you know any programming language (like Java, Basic, or JavaScript) you know PHP.  The language adheres to modern best practices in terms of language syntax and punctuation.  A good knowledge of HTML is also very helpful and some basic Internet tools knowledge like a little bit about email servers, etc.

Bottom line 3 days and my application was working.

So PHP and MySQL are easy to use.  Is that a reason to use them?  Nope!  There are other easy to use tools.  What makes PHP and MySQL so dynamite is the fact that they are totally pervasive everywhere.   Additionally there is a vast library of free applications, utilities, etc. out there on the Internet for free.  Stuff written in PHP and MySQL's SQL dialect is 100% portable to any platform that runs PHP and MySQL. 

Isn't interesting that IBM advocates PHP over their own proprietary languages and technologies?  IBM is the leading company funding the open source community.  Zend is a huge business partner and PHP counters many proprietary Microsoft offerings.  It also counters several proprietary Adobe offerings.

Folks I was totally stunned when I found out I had a very large disk allocation, MySQL, and PHP on a $12 per month hosted web site!  Think about the implications of this.  PHP and MySQL are everywhere.  They are free for the download and they exist on cheap hosted servers.  You can implement SOA components and interoperate on a cheap standalone server with any other server.

TWELVE DOLLARS PER MONTH!  Compare that to the thousands you are spending and that I have spent in my previous life.  Consider also that if you can learn JavaScript or Basic you can learn PHP! In other words "cheap labor". 

I certainly liked many of the features of EGL and Java but you cannot beat PHP for quick easy to use robust and scalable web applications.  Took me a while but I finally GET IT! 

Bob C.



Read the original at Bob Cancilla on IBM i.

Categories: Blogs Tags:

Mike's IBM i PHP blog and more... › What I did on my trip to COMMON

May 14th, 2010 Comments off
While there are probably several examples of great educational opportunities in the IBM i space, COMMON has to be the most popular. If you did not make it to COMMON you missed a great show and I’m going to take a few minutes to discuss what you missed. I have to say that I have been to several COMMON conferences and that this one was laid out really well. Reno was so spread out I got plenty of exercise walking form session to session. The fact that I gave 10 talks with one of the being a repeat means I really had my skates on in Orlando. But in all cases we were able to concentrate on a single area of the hotel where we had access to all of the session rooms. This was a really nice feature! The Expo and main event rooms were also very conveniently located.

Big speaker?
I wish I could tell you that I was the most popular presenter at the event. While the numbers are still being tabulated I must say I did OK but Scott Klement blew out nearly every room in which he appeared! In one case, the COMMON and Hotel staff opened an air-wall to make room for folks who were sitting on the floor and standing in the aisles to hear him speak. If I wasn’t so darn busy I would have probably checked him out myself! Check out his videos at you tube.

What about the expo?
The expo is what I look forward to the most. As a vendor, I had “booth duty”. This includes things like setup, working the booth, meeting people and breakdown. Obviously meeting the people there is the highlight of my trip and I met lots of folks who are doing all kinds of exciting things with PHP on IBM i. We even had a special visit from the PHP Elephpant who was making his debut appearance at COMMON 2010!

And the nightlife?
Then there were the evening events. The first night we had the power down, “Ask the Experts” session. I have always enjoyed this session as a customer because I had virtually unbridled access to IBM and community experts for many topics. I was working the Open System table with abunch of folks from around the world


Read the original at Mike's IBM i PHP blog and more....

Categories: Blogs Tags:

Mike's IBM i PHP blog and more... › What I did on my trip to COMMON

May 14th, 2010 Comments off
While there are probably several examples of great educational opportunities in the IBM i space, COMMON has to be the most popular. If you did not make it to COMMON you missed a great show and I’m going to take a few minutes to discuss what you missed. I have to say that I have been to several COMMON conferences and that this one was laid out really well. Reno was so spread out I got plenty of exercise walking form session to session. The fact that I gave 10 talks with one of the being a repeat means I really had my skates on in Orlando. But in all cases we were able to concentrate on a single area of the hotel where we had access to all of the session rooms. This was a really nice feature! The Expo and main event rooms were also very conveniently located.

Big speaker?
I wish I could tell you that I was the most popular presenter at the event. While the numbers are still being tabulated I must say I did OK but Scott Klement blew out nearly every room in which he appeared! In one case, the COMMON and Hotel staff opened an air-wall to make room for folks who were sitting on the floor and standing in the aisles to hear him speak. If I wasn’t so darn busy I would have probably checked him out myself! Check out his videos at you tube.

What about the expo?
The expo is what I look forward to the most. As a vendor, I had “booth duty”. This includes things like setup, working the booth, meeting people and breakdown. Obviously meeting the people there is the highlight of my trip and I met lots of folks who are doing all kinds of exciting things with PHP on IBM i. We even had a special visit from the PHP Elephpant who was making his debut appearance at COMMON 2010!

And the nightlife?
Then there were the evening events. The first night we had the power down, “Ask the Experts” session. I have always enjoyed this session as a customer because I had virtually unbridled access to IBM and community experts for many topics. I was working the Open System table with abunch of folks from around the world


Read the original at Mike's IBM i PHP blog and more....

Categories: Uncategorized Tags:

ile rpg programming: tips and techniques › What exactly is ILE?

May 13th, 2010 Comments off
So what exactly is ILE? Sure, the term ILE has been used extensively in the IBM i market for some time but what exactly is does it mean? According to Big Blue, ILE stands for Integrated Language...

Visit site to read full content and more



Read the original at ile rpg programming: tips and techniques.