Table of Contents
Welcome to our IBM i (iSeries / AS/400) FAQ & Cheat Sheet and quick tutorial.
Introduction to the AS/400 Cheat Sheet & FAQ
The first point to tackle is the name, for our purposes the terms “AS/400”, “IBM iSeries” and “IBM I” are one and the same thing. The product manager at IBM Rochester will hate me for saying it, but in reality when you visit companies running ‘IBM i’ as IBM want to call it now everyone still calls it AS/400 or maybe iSeries. The name ‘IBM I’ came about as a poorly judged rebranding a few years back.
Of course like the ‘PC’ and the ‘Mac’ the current models of IBM I are a very long way from where they started back in the 1980’s, but the other platforms don’t keep messing about renaming themselves, “PC”, “Mac”, “Unix”, “Windows” brand names have stayed the same over the years as the products themselves have evolved to where they are today.
The list of FAQ’s is at the bottom of the page.
If you have a specific question about how to do something please post a comment and if I can I’ll answer your question and then add it to this list.
What is an IBM AS/400 System?
The IBM AS/400 was the result of a long project at IBM to bring together their S/3, S/36, S/38 ranges onto a single common new platform. Over the years the platform evolved to be able to also run Unix, Linux, PHP and even via additional Intel processors Windows. As the role of the platform has changed so has it’s name. Originally coded named the Silver Lake Project, then AS/400, then iSeries and now IBMi. The Operating System is generally known as OS/400 and more recently IBM have referred to it as IBM i5/OS.
AS/400 (IBMi) Quick start facts, to get you up to speed quickly:
- Don’t think of the IBM i (AS/400 or iSeries) as a legacy platform. It actually one of the youngest Operating Systems on the market today. Unix was started in the late 1960’s as a single user workstation operating system. Likewise Windows traces its roots back to DOS and VAX VMS which was reborn as Windows NT. The OS/400 Operating System in contrast was designed on a blank sheet of paper in the mid-70’s as a future multi-user, object based operating system for smaller companies without big IT support departments. It was one of the first fully 64bit platforms. It’s technology independent software layer means that applications are dynamically regenerated if and when IBM ship new processors. Over the years this has seen code auto update from 32bit, to 48bit and then full 64bit. It’s internal addressing structure is 128bit already.
- We sometimes hear people say AS/400 is a legacy green screen system. Yes it does support a terminal interface in the same way that Unix and Apple Mac OS X and Windows do but the vast majority of people access applications running on the IBM iSeries today will be using a modern GUI environment and increasingly iSeries applications are delivered via a web browser interface. The Operating System comes with the Apache Web Server and IBM WebSphere pre-integrated and ready to go, so that users can connect to the OS Browser based admin portal.
- An AS/400 is to Unix what an Apple Mac is to Windows. By this I mean that it ships with everything pre-integrated, for example the DB/2 database is integrated into the OS. The OS then uses DB/2 to store configuration information. Likewise as mentioned above Apache and WebSphere are pre-integrated.
- What is AS400 Technology? The AS/400 was the first Object based system. Everything on the system is an object. For example if you have a printer called PRT01 then you can use the DSPOBJ PRT01 command to display basic information about the printer, likewise if you have a user called FRANK then the DSPOBJ FRANK command will display basic information about FRANK.
- Because everything is an Object, security is inherited and enforced by the Operating System at Object level.
- OS/400 has GUI clients but was originally designed to be used from a text based terminal. You can usually telnet in using a VT100 client but the system is designed to use the IBM 5250 client.
- The OS/400 text interface was probably one of the last text based Operating Systems to be created in the 90’s just as everything else was going GUI. This is very much the state of the art text interface and worthy of study!
- If you don’t know any OS/400 commands then you can achieve a lot by simply typing GO MAIN and pressing enter. This will take you to a user friendly main menu which will ask you what you want to do and then step you through doing it.
- F1 provides help anywhere.
- F4 provides context sensitive prompting and is much better than having to go through manpage on Unix.
- All the commands follow a logical naming convention eg <adjective><noun> for example WRKUSRPRF FRANK for Work with user profile Frank, DSPUSRPRF FRANK for display, DLTUSRPRF FRANK, PRTUSRPRF FRANK.
- For a complete list of commands try GO CMDWRK or GO CMDDSP or GO CMDPRT
- OS/400 supports virtualisation. One machine can be split into many LPARS (Logical Partitions) each being a virtual machine. Resources can be dynamically moved between LPARS for example memory,CPU’s etc. Each LPAR is a separate virtual machine (VM) and can run different versions of OS/400 and indeed other Operating Systems such as AIX and Linux.
- While you can split a system up using LPARS for most practical purposes where the workload is all OS/400 based the work is better managed through the creation of Sub Systems. This is object type *SUBSD or Sub-System Description. Once you have created a Sub System Description you can create job queues (CRTJOBQ) and then add these to the Sub System (ADDJOBQE) to get work done. You can also add work stations (terminals) to the Sub System (ADDWSE) to group users together. For example you might create a Sub System called TELESALES for your call centre where you want the operators to have the best possible response times. To this sub system you would add all the workstation ID’s in that department, add memory and processing priorities. You might then create another sub system called REPORTS where end of day management reports can be run. These can be lower priority. Typically most AS400 systems have by default QBASE the base subsystem, QINTER the interactive subsystem and QBATCH the batch processing subsystem. If you end a sub-system (ENDSBS, e.g. ENDSBS QINTER *IMMED) the memory and processing is dynamically reassigned to the QBASE sub-system.
- OS/400 has a built in Queue object called a Data Queue. On other platforms you might have to install something like Apache MQ to achieve the same asynchronous process communications capability.
As above, if you have a specific question about how to do something on the AS/400 (iSeries) I’d love to hear from you. Either e-mail me directly or better leave a comment below and I’ll get straight back to you.
IBM AS/400 Frequently Asked Questions (FAQ)
Question: What is or are AS/400 Jobs?
Answer: This is a good question. On the AS/400 a job is created when a user session is created or a batch job is created. It’s the equivalent of a process in Unix. Jobs can have multiple threads. Unlike other systems on the AS/400 the job stays in the system until all processing work has completed and all printed output has been printed or deleted. Each job in the system has a unique job number and can be found via the DSPJOB command. Type DSPJOB and then press F4 to see all the parameter options on this command. Entering DSPJOB and pressing Enter defaults to showing all the details of the current job – ie your current terminal session.
Question: What is an AS/400 Database?
Answer: The AS/400 has IBM DB/2 tightly integrated into the OS/400 Operating System. It’s so integrated that OS/400 uses DB/2 to store various configuration tables. This database can be connected to via ODBC and JDBC. Typically in applications dating back to when the AS/400 and S/38 were launched the database is defined using DDS (Data Definition Specification) but more modern AS/400 applications use more standard SQL DDL to define their database schema. On the AS/400 Tables are typically called Files, and the database is called a Library for historic reasons. The AS/400 is based on the IBM S/38 which was the first commercial Relational Database System. These days the AS/400 database can also be used as an engine for MySQL to store data in a high security, high integrity system and this can be used to port applications from the LAMP stack onto this enterprise scale system.
Question: What is AS/400 used for?
Answer: The AS/400 (iBM i) is an enterprise class server, it probably helps to think of it as a small mainframe, so it’s never going to be used for desktop applications these days. When it launched it did support IBM Office Vision which provided email, word processing and database functions. These were later migrated to Lotus Notes and the Office Vision product discontinued. Today the system is used for applications which require high security, high integrity and high availability. The system has never been successfully hacked and has never had a native virus. It is therefore used for commercial applications such as Accounting, Order Processing, Insurance and Financial Applications / Banking Applications, running Web Applications and Card Processing.
Question: What is the future of the AS/400?
Answer: This is a difficult question, technically the IBM i is still probably IBM’s most advanced operating system. The problem is IBM as a company has moved on from really making machines and developing its own technology platforms. These days IBM is all about services. They seem to be able to make more money selling other companies technology which needs more services to implement than selling their own system. That said IBM are committed to the Power Architecture on which the IBM i is based. They use this for their mainframes and unix systems. IBM is also committed to supporting and developing IBM i as they have so many major customers running on this platform. Almost every company in the FTSE 100 will be running IBM i based systems somewhere in their organisation for enterprise critical applications and IBM can’t afford to upset such major accounts. The installed base of active IBM i servers is also said to be growing as a number of financial institutions move sensitive applications to the platform for security reasons.
Question: What is a Spool file in AS/400?
Answer: IBM really need to rename this, as SPOOL file is just a print job sitting on a printer queue. SPOOL is a computer science term which stands for Simultaneous Peripheral Online Operation. The term dates back to the early days of commercial computing when processes could only do one or two things at once and the idea of keeping lots of printers and terminals and batch jobs running was very new. On the AS/400 you may also come across the term Print Writer. This is essentially the Print Manager for a physical printer which takes printed output from the SPOOL Queue and sends it to the printer device.
Question: What is the difference between AS/400 and Mainframe?
Answer: In simple terms the S/38 and then the AS/400 were to be the successors to the IBM Mainframe line. Back in the 1980’s IBM had multiple proprietary systems all of which were largely incompatible. They started one of the biggest projects in the history of computing to create a modern platform that would suit the needs of all their current customers. The system they first launched was the IBM S/38, this was a highly advanced pioneering system somewhat ahead of it’s time. The Operating System (CPF) was too intensive really for the CPU’s of the time. The S/38 was later updated to merge the S/34, S/36 and S/38 lines into what became the AS/400. The system then launched with all the mainframe languages such as FORTRAN, PASCAL, COBOL and RPG all sitting on top of a fully integrated and autonomous DB/2 database. Unlike main frames and many other systems to this day it is designed to be largely autonomous and doesn’t need full time database administrators or operations staff. So you may then ask why do IBM still sell mainframes? It’s really down to two reasons, politics within IBM and customer needs. Although it’s popular to think of Main Frames as dinasours the workload going through these systems is increasing every year and they are constantly being upgraded and developed. What consumers see as the cloud may in many cases actually be a process running on one of these mainframe or IBM I systems in a data centre out of sight somewhere – ultimately the cloud is just a set of big servers in someone else building.
Question: What is the use of flat file in AS/400?
Answer: A flat file is what some other systems call a fixed position file. On the AS/400 it will be seen as a database table with a single column. Position 1 to 8 might for example contain the transaction date, positions 9 and 10 might contain a transaction type and position 10 to 23 might contain the transaction value. The important point here is that the AS/400 operating system (and DB/2) don’t know the structure of the data in the table. An application program will have to parse the data as it is read and make sense of it. On the AS/400 languages like RPG make this sort of processing ease as its a common requirement in commercial computing.
Question: Why is the AS/400 not using a database index (logical) when running my SQL statement.
Answer: I have written a post which covers a case I had when an existing job which had been running for years and completing in seconds suddenly starts taking minutes to complete. Click here to ready – why is AS/400 SQL failing to use database logical.
Question: How often should you IPL and AS/400?
Answer: Generally you should not need to IPL an IBM i (AS/400) on a routine basis. You really only need to IPL if you are doing maintenance work which needs the system to be shut down and restarted. Unlike some systems IPLing (rebooting) frequently will probably reduce performance, for example DB/2 will dynamically tune the database and add temporary indexes. These will be dropped during an IPL. People who work on AS/400 will tell you many stories of systems which have run for many years unattended and never IPL’ed. All that said, from an IT Management perspective rather than from a technical perspective I would recommend doing an IPL at least every six months. The reason is this procedure while not complicated should be well understood, documented as a standard operating procedure (SOP) and practiced. The IPL itself is simple but usually the application takedown process and the process to bring the applications back online varies from system to system.
Question: Which companies use AS/400?
Answer: In the UK you most of the FTSE 100 companies will use IBM i (AS/400) somewhere in their IT estates. In the past Microsoft used AS/400 as their back office system for book keeping and logistics, although those days are long gone now they have their own Microsoft Dynamics ERP range. Today the platform is increasingly used by financial institutions and online businesses that need a highly secure platform to protect customers personal data, a subject which is ever more important since the introduction of GDPR.
Question: How can I export IBMi / AS/400 data to an ASCII CSV File?
If you want to automate IBMi to CSV data download in a CL program or run it from the command line, see my blog about this – how to download an ASCII CSV from the IBMi On the other hand end users or power users who just want to download a single table as a one off exercise may want to look at the Data Transfer option in the Client Access software which is generally installed alongside IBM Client Access Terminal Emulation software.
Question: Is AS/400 an Operating System?
Technically no, AS/400 and IBMi are the names of the overall system including the hardware. The Operating System for AS/400 is OS/400 which was rebranded IBM iOS. Today IBM iOS runs on Power Hardware along with AIX the IBM Unix Operating System and Linux.