The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Ancient Technologies - RPG & AS/400

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
David Cumps

Posts: 319
Nickname: cumpsd
Registered: Feb, 2004

David Cumps is a Belgian Student learning .NET
Ancient Technologies - RPG & AS/400 Posted: Mar 21, 2004 9:24 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by David Cumps.
Original Post: Ancient Technologies - RPG & AS/400
Feed Title: David Cumps
Feed URL: http://weblogs.asp.net/cumpsd/rss?containerid=12
Feed Description: A Student .Net Blog :p
Latest .NET Buzz Posts
Latest .NET Buzz Posts by David Cumps
Latest Posts From David Cumps

Advertisement
I just finished a school project in RPG. In the beginning I hated RPG and the AS/400 it was running on. When you're used to writing languages like PHP, C++, C#, Perl and even batch, RPG seems like a nightmare, crazy syntax, column based, numeric vs character variable handling, ...

And then we had to do a project for that class. The teacher talked about a previous group doing something with HTML and CGI on the AS/400, so I decided to take on the challenge and write a complete website that uses the AS/400 as back-end with RPG as the language.

Some obstacles I encountered:
  • The website was going to be written in PHP, but our AS/400 didn't support it, so the decision was quickly made to host the site on another server. But this adds the added difficulty of communicating between site and AS/400. In the end the site is running on Windows 2000 with IIS and uses DB/400 for data storage on the AS/400.

  • The first communication attempt: DB/400 supports stored procedures, so we'll just access the RPG programs trough sprocs. But again, problems, at first we simply couldn't connect to the server, we later figured out it had to do with permissions. But after those permissions there was no way I could call a sproc from PHP.

  • So I changed the way of communicating. First I created a PHP class that can easily construct a command to call the RPG program. It takes the program name and parameters and execute it. What happens in the back is, a querystring is constructed, it gets called on the AS/400, there a program pulls in the querystring and parses it, after which it calls the apropiate RPG program. Each RPG program has some return value which gets send back to the PHP object that initially made the call and then the returned info gets processed on the website.

    Here's how it goes in the final result:

Ofcourse there were also a lot of obstacles getting to know RPG and the way it works with the system, especially in the capitalization departement, sometimes it's case sensitive when you don't want it, and another time it's back to case insensitive.

But in the end, now it's finished, I'm amazed of the result. A fully working PHP website on a seperate server, running Windows, with an AS/400 back-end, using RPG as the language to talk with DB/400. It amazes me that a technology that old can play along with a new technology like PHP.

What do you think about ancient technologies? Do solutions like the one I just described still happen? Did you made one already?

I'd really like to know how much of these things still happen in the business world, because as a student I really have no idea.

Read: Ancient Technologies - RPG & AS/400

Topic: Speed of direct calls vs interfaces vs delegates vs virtuals Previous Topic   Next Topic Topic: Favorite VS.NET keyboard shortcut of the day

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use