AS 400

My new job requires me to learn an AS 400 database (Rumba).. Its not too difficult, but its a little different than what I`m used to.. Anyone else work on this?

I've farted around on db2...but that's it!

rumba is NOT a data base - it's a 5250 (dumb terminal) emulation package - you can transfer files between the 400 and a pc through rumba -

what do you need to know?

The AS/400 is a great machine, when I got a job at a 400 shop out of college I was rather put out that I was not working with unix, but now I am rather fond of the as/400.

First of all there is an IBM AS/400 help site, that has everything you need to know. there is also a great site to post questions,

The only problem is that there is an enormous volume of information, so I will give you a five-minute version. Every command on the as400 is a sort of abbreviated sentence. So if I want to work with a user profile I type WRKUSRPRF, and if I want to work with all of the active jobs I type WRKACTJOB. All of the abbreviations are standard, so after a short while you can usually guess what a command would be. To start the program development manager (The native development environment) you key in STRPDM. To start the debugging utility you key in STRDBG. To start the interactive SQL interpreter you type STRSQL.

If your not sure what command you need, you can get to a menu that lists the commands by typing GO MAJOR, which provides you with a high level list. Lets say we are trying to copy file, but are not sure what the command would be. After typing GO MAJOR, we could take option 2 because we know the verb of our sentence “copy”. After taking 2 for verbs on the next menu we take 18 for the verb copy, and on the copy menu, we see that option 7 is for copying files and the command is CPYF, which we could have guessed if we had known that the F is short for file.

Now that you have commands, you have to know how you indicate options. We are going to copy a file, but which file, and to where? The best way to enter these commands is by prompting. Type your command and hit F4, and it will bring up a form with all of the possible options for your command, already filled in with the appropriate defaults. Prompting is an awesome feature that works almost everywhere, even while you are writing a program or SQL statement!

Now on to the database, on the AS/400 there are 2 ways of doing everything, which I will call, for lack of a better term, old school and new school. The AS/400 has been around for a while, and when it was first being used, SQL was not big in the way that it is now, so the AS/400 had its own way of doing everything. So if you want to create a database table you need to write something called DDS which stands for data definition source, which is a special language for specifying fields constraints and so on. Or if you want to do it new school you can use SQL. The old school guys when they want to start a query enter STRQRY, and use that tool, or you can use SQL. If you want to change the data in a table you could start the data file utility (STRDFU) or you could use SQL.

The terminology is different on the AS/400, take files for example. When 400 guys say “file” they almost always a database table. The proper term is a “physical file”. A logical file is a database index. A source file seems like a text document when you edit it with the source entry utility (STRSEU) but it is also a database file, and if you were so inclined you could run a query accost it and see the source you have written. A spool file is what you get when you print something, and it is more like a Unix file (just one really long string) you can’t edit it though, just view and print it. If you want to work with all of your spool files you use the command WRKSPLF. Things on the AS/400 tend to wait in queues. Spool files wait in print queues. If there is no printer attached to the print queue, it will wait there until you move it or delete it. Every time I compile a program it creates a spool file to tell me how it went, I can view it on the AS/400, or I can move it to a print queue that is attached to a “writer” which means that it will actually be sent to a printer.

Well its time to get off to bed, if you have any questions, feel free to ask and I will answer them or at least get you pointed in the right direction.

As/400 rocks, man!

Even without web documentation (like when I started working on them in '92) there's only two function keys you need to know that will let you learn 70% of it on the fly:

F4, and F1

F4 (prompt) will tell you what you can say, F1 (cursor-location sensitive help) will tell you what it means.

I too used to have Unix envy, until I saw how hard the DBA's had to work (AS/400 comes with DB2 under the covers) on other boxes, how often the other boxes bounced or ran out of memory, or ground to a halt paging really big tables. Now my company's inching ever closer to trying an As400 as a web server.

With AS400 everything is virtual memory - no swapping needed, the OS safegaurds integrity. This is a big performance boost.

It's a niche machine at present, though. This can be a good thing.