Al Barsa



Al BarsaThis morning, on my way back from COMMON, I received email from a friend informing me that Al Barsa had passed away last night.

This news hit me very hard ... Al has been a pillar of the AS/400 (yes, I use that name deliberately) community for many years and a friend. His passion and enthusiasm for the platform could be matched by very few.

He's been an active participant in the midrange.com lists almost from the their inception ... always willing to share his knowledge, never hesitating to help someone out, pointing them to the right manual, or clearing up some technical detail.

His COMMON sessions were always well received and very informative (if a bit rushed ... but, heck, how else are you going to get through all the system values in a 2 hour session :) ).

My flight leaving Nashville this morning was delayed due to thunderstorms in the area ... which, in retrospect, make sense ... there's bound to be some turbulence when a spirit with the the passion and enthusiasm such as Al's has passed.

From the accounts I've heard, he passed away in his hotel room while working on his laptop ... no doubt revising his sessions for the next COMMON conference.

Our thoughts and prayers go out to Al's family.

midrange.com will be making a contribution to the COMMON Educational Foundation in Al's memory.

Technorati Tags: , , , , , ,

“I” is not a System “I” anymore



Well, I haven't been blogging from COMMON yet ... but I just got out of the IBM Town Hall meeting a few minutes ago.

It was announced that the "System i" and "System p" were merging into a single, unified, platform called "Power".  The OS, originally named OS/400, then I5/OS, is now going to be called "IBM i".

New hardware was announced that would be common between "i", "aix", and "linux" ... all the same price, regardless of the OS that runs on it.

New marketing campaigns that will mention "i" set to be run.  Starting with a full page ad in the local paper.  I think they run a full page ad in the local paper at every conference.  Let's hope they live up to the promise and keep the marketing going.

They also mentioned more academic initiative stuff.

More later.

Easy Field Encyption for System i



For our new billing system (AR), we wanted to store account numbers for so that our customers could auto-pay their bills. After some searching and seeing how complicated the APIs are to use, I found these SQL functions: ENCRYPT_RC2(data, password) and DECRYPT_CHAR(data, password) . These looked promising and being that this is an internal-only system, we thought that this should be okay.

Now the challenge, we don't want to have to use SQL INSERT and UPDATE statements every time we create or update a new record. RPG (Report Program Generator) has built-in commands to do that: WRITE and UPDATE. I found this article that talks about some work-around options. One of which is a trigger. This makes the most sense for our scenario.

By creating the trigger as a "before insert" or "before update" it will take the text passed and encrypt it before actually writing it to the table. Here is a sample:

CREATE TRIGGER MWLIBR.TEST_INSERT
    BEFORE INSERT ON MWLIBR.TESTP
    REFERENCING NEW AS N
    FOR EACH ROW
    MODE DB2ROW
    BEGIN
    DECLARE PASSWD VARCHAR (127) ;
    SET PASSWD = MWLIBR.GETPASS () ;
    SET N.ACCOUNT = ENCRYPT_RC2 (N.ACCOUNT , PASSWD) ;
END;

Notice the GETPASS()? That is the secret to the magic. That is a user created function. I'll get into that in a minute. What this function does is take the ACCOUNT field and encrypt that. You will need to also create one for UPDATE as well. This will take care of your writes. Now you won't have to change anything in your RPG program to update or write to this file.

The function is relatively simple. We simply need to return a "password". I would recommend using a site like goodpassword.com to generate a random password. I used a 80 long string with special characters. Good luck dictionary attacking that hackers! Here is the function:

CREATE FUNCTION MWLIBR.GETPASS ()
           RETURNS CHAR(127)
           LANGUAGE SQL
           SPECIFIC MWLIBR.GETPASS
           NOT DETERMINISTIC
           READS SQL DATA
           CALLED ON NULL INPUT
           DISALLOW PARALLEL
           BEGIN
                      RETURN 'mypassword';
           END;

Now the problem comes in, to keep our model simple, we would like this to be as easy to use as READ to get this data, but we can't just allow anyone to see that information. So we have to add a layer of difficulty in using it. There are a few options, and I'll leave it to you to figure out which will work for you.

  1. Use SQL to access that data. Just a simple
    SELECT DECRYPT_CHAR(myfield, GETPASS()) FROM myfile WHERE mykey = key;

    will get you the account number.

  2. Use an SQL view.
    CREATE VIEW lib/view from SELECT KEY1, KEY2, DECRYPT_CHAR(myfield, GETPASS()) FROM myfile

    The problem with this method is you might as well just not secure it at all unless you lock down this view tight.

  3. The final option would be a subprocedure. There can be two approaches to this.
    1. Write a seperate subprocedure for each field you have encrypted.
    2. Write one subprocedure that could work for everything. For instance:
      getEncryptedField('MYLIB' : 'MYFILE' : 'MYFIELD' : 'WHERE STATEMENT FOR THE KEYS')

      This would look like:

      getEncryptedField('MWLIBR' : 'TESTP' : 'ACCOUNT' : 'TESTKEY = 123 AND KEY2 = 567')

So there you have it. It isn't only complicated and should work for most people. Any problems or comments? Just leave a comment on the thread and if I have any errors, I will immediately correct them.

LUG Services



For those of you involved in System i oriented Local User Groups (LUGs), midrange.com offers some free services that you might like to take advantage of ...

Mailing lists

You can request two types of mailing lists ...

  1. A simple announcement list to broadcast meeting information & other important bits to your membership. This type of list is being used with great success by The Omni User and the Washington Area Midrange users group (WAM). These lists are usually named '<lug name>-announce@midrange.com'.
  2. Private discussion mailing lists for small organizing groups in your LUG ... your BOD, annual tech conference organizing committee, etc. These lists are usually named '<lug name>-<committee name>-discuss@midrange.com'.

To utilize this service, contact me and I can get it setup. Once the list(s) is setup, I'll provide you with a URL for the list administrative interface and a password. You then import your membership email roster into the list and you're ready to go.

As with all midrange.com hosted mailing lists, no subscriber lists will ever be sold or distributed to a third party for any reason.

I can host up to two lists for each LUG for free. If you need more than two lists, let me know and we can discuss it.

Banner Ads

The banner ad serving offer falls into two categories ...

  1. Regular meetings ... targeted at your specific geographic region.
  2. Special events ... annual tech conferences, once a year events, etc. Targeted at entire US.

For the regular meeting banner ad's, you just need to provide me with 468x60 banner ad that advertises your user group, a target url, and the geographic region you cover.

For the special events, you can provide me with one or two banner ad's (one 468x60 and one 300x250) that advertise the event, the target URL, and the effective dates. I will set the banner up to run for the entire US. An example can be found at http://omniuser.org/images/omni07bannerWide1.gif and http://omniuser.org/images/omni07bannerSquare.gif (these were both run for the OmniUser 2007 technical conference).

If you would like to utilize either of these services for your LUG, feel free to contact me at 'support@midrange.com'.

Technician, fix thyself



Similar to the old saying "Physician, heal thyself" ... I certianly should live by those words.

Today I was chasing down a problem on one of our systems at work ... a program that works fine on V5R2 wasn't working on V5R3.

I was 99% sure the problem was in an i5/os server program ... and even found a APAR that described the problem almost to the tee.  Unfortunately, the PTF identified in the APAR didn't help.

So I called IBM and opened a PMR ... I got transfered to Colleen in the languages group, who looked at the job log and source fragment I sent, and sent me a reply indicating that the following link might be useful: http://archive.midrange.com/midrange-l/200505/msg00900.html.

DOH!  Maybe I should have done a bit more research myself before opening up the PMR.

I made the adjustments identified in the MIDRANGE-L posting and, lo and behold, the program worked perfect.

The RPG Cycle. JSF would like it, but can’t have it.



I was sitting here at my desk after replacing the window motor in my van pondering this thought:

"Man, I think JSF is trying to emulate the RPG cycle with it's 'Life Cycle' (click here), the exact thing that so many RPGers are trying to get away from."

Or maybe it is better stated to say I hear many wanting IBM to rid RPG of it "legacy" features. I must admit that I have held my hand high with the same chant, though now I must recant. Yeah, I know I am making a stretch to say the JSF and RPG cycles are the same, but none-the-less the Java community is trying to adopt cycles which RPG has had for how many years now?

Makes my head spin to see all the excitement in the browser framework world. Seems like we are always trying to get back to what 5250 screens have had for such a long time - ease of user interface development. No, I am not ignorant to the fact that green screens aren't very appealing, but the reality of it remains that if RPG had a new GUI face (and maybe a syntax facelift), it could arguably take the application development industry by storm. Just look at all of the efforts by Sun, Microsoft and Adobe to make yet another, "thicker" browser with their JavaFX, Silverlight, and Flex3 respectively.

Makes me wonder how "legacy" RPG and it's infrastructure really is. I have been with the language for about 10 years now and I left RPG for awhile to have some fun with Java. I loved Java at first because there were some really nice and flashy things that made my heart twitter (twitter would be like the first time you sit next to your future wife, but before you give the first kiss). But even when I factor in how fast you can write Java code, it still comes down to long-term support of the applications built. The Java frameworks out there are very nice, but I can't count the hours I have spent trying to make something work in Hibernate or MyFaces that just wasn't meant to be because the writers didn't have forethought of how others might need to use it.

That's what keeps bringing me back to RPG, DB2 and i5OS - the trio that just doesn't die. It has the best framework out there, mostly because you don't even know you are in one! I can't help but think what would happen if the cycle was modified to work with a new GUI interface that was native on the i5. Platform independance (i.e. EGL/Java)? Phooey, that is what vendors (of which I am) say to make people think they need their product. I would much rather have "The Trio" to keep my business running efficiently and reliably at a reasonable cost. When will IBM catch on to the potential gold mine they have already built - it just needs "tweaking". We can dream can't we? :-)

Well, it is time to go back to work.

Oh, and on last note, if you haven't already, please add the following to your list of blogs to visit: iDevelop

V6R1



Well, it appears that IBM is getting ready to give us a taste of what V6R1 is going to include.

http://www-03.ibm.com/systems/i/os/i5os/v6r1preview.html

Not a lot of details ... I think the redpaper mistake earlier reported is probably more telling than the 'Preview' information.

[tags]ibm, system i, iseries, i5/os[/tags]

Found and Lost



Looks like IBM had a but of a flub on the 'Redpaper' site ... a redpaper showed up on my planet.midrange.com RSS feed with the title 'i5/OS Program Conversion: Getting ready for i5/OS V6R1'. The abstract was quite interesting ...

Abstract: IBM® plans to deliver i5/OS® V6R1 in 2008. With this new release, IBM will require conversion of all programs created underprevious releases that use the i5/OS Machine Interface (MI). This conversion upgrades and refreshes programs to take advantage of the latest system enhancements, including enhanced system integrity, improved performance, and a range of new operating system and processor capabilities. In order for a program to be converted, its creation data (sometimes referred to as  observability) must be available. Programs created for V5R1 or later have their creation data automatically saved during program creation. Clients and ISVs with programs created for OS/400® V4R5 and earlier need to ensure that the creation data is available for the conversion process.

Sadly, the redpaper is no longer available. I suspect it was prematurely released.

Needless to say, the information contained in the redpaper was pretty darn interesting ...  especially for  those ISV's that support multiple releases at once.

[tags]ibm, redpaper, redpiece, System i, iseries, i5/os[/tags]

Aaron’s Video



Our friend Aaron Bartell produced a ... um ... interesting (yeah, that's the right word) video while taking a break from writing an article for System i Network magazine.

What do you think?

System i evolution: The missing link is still missing (Part 2)



How did we do? Well, it has been a mixed bag. Our interest in keeping the solution cross platform quickly ran aground as we faced the difficulty in getting the more entrenched RPG programmers to embrace Java as well as finding Java programmers who were comfortable in the System i world. We also got some push back from customers who also did not have the Java programming resources to grow and enhance the solution. We also began to use, through the hiring of an individual, an ILE RPG CGI framework that would be more "comfortable" for the RPG programmers to use and be more productive. This two pronged approach was completely wrong for a host of reasons and has hampered, IMHO, the overall solution. The business model we used, using support revenue to fund the development of an Open Source solution is actually a good one and has been successful overall. Had those resources been more carefully managed, matching development costs more closely to the revenue model, it would have been an excellent way to grow the overall effort.

Focusing on the development approach: We completely underestimated the effort required to build a web application. I don't care whether it is written in Java or ILE RPG, the skill set needed to develop a UI using HTML, CSS and Javascript plus backend business logic and framework components completely overwhelmed our programming staff. It was recommended very early on that we hire at least two "HTML Monkeys" (as one programmer called them) to offload the UI to folks with the proper orientation to UI. That recommendation was never followed but would have saved countless hours of programmer time. I honestly don't think a programmer should be designing a UI in a web solution. Period. I also don't see any more productivity in either ILE RPG or Java (the only two programming languages we used). If the programmers could have focused on writing business logic and enhancing the framework, rather than designing UI, we would have been much better off.

If I was starting out today with the same code base and the same goals, I would do the following:

  1. Use HATS to get a web interface in front of the customer NOW. I would do this because the lengthy wait for a completed solution led to some attrition in the customer base. Better to have a transitional technology in front of the customer now to hold their attention rather than to try to hold them with promises. HATS was not mature enough in 2002 and the System i not yet powerful enough to make HATS a viable solution at the time. It is ready for prime time now.
  2. Decide on a single programming language and go with it. Personally, I like the idea of Java on System i because it makes a solution potentially portable to other platforms while leading with the strengths of System i. However, ILE RPG is a "natural" for the System i and many folks who are already on i are more comfortable writing RPG code. Naturally, RPG will be more productive for RPG programmers and Java more productive for Java programmers (duh!). But there is nothing inherently more productive about either language (although the OO nature of Java might lead to more productivity over time, IMHO).
  3. Find a framework that is productive. Tough call here and this is where the "missing link" comes in, particularly for RPG programmers. IBM provides no tools or frameworks in RPG that made the move to the web easier. CGIDEV2 was a community response to that deficit,and a good one, but this deficit in in IBM supplied RPG web frameworks still remains. When I look at other tool providers, the successful ones who had proprietary languages that did text based applications migrated their tools to the Windows UI and then on to the web. Microsoft in particular did a great job with this, moving Basic to Visual Basic to VB.NET. Yes, very different languages but MS at least developed the solution (or bought it) and got it in front of their developers. IBM got with the Windows GUI program with Visual Age RPG but then when the web appears they did ... ? I am mystified that IBM who fully "owns" RPG and clearly saw the web as the next UI wave simply froze and did nothing to enhance the language to easily get applications to the web. What were they thinking?

We have an awesome platform, loyal customers, and a cadre of programmers just dying to cut their teeth on an IBM supplied, leading edge, ILE RPG based web framework. Where is that web framework, now 12 years after the popular advent of the Internet? That is the missing link. A "link" sorely needed as the platform struggles to maintain market share.

There are many, many other lessons learned from this experience and I am certainly ready and will to share them. Feel free to chime in.

« Previous PageNext Page »

Close
E-mail It