Anda di halaman 1dari 7

Three Essential AS/400 Tasks You Need To Know

The operating system that runs on an AS/400, iSeries, i5 is known as OS/400 or i5/OS and it is
command and menu driven. At its heart everything tends to be a command and even the menus
that you see use commands behind the scenes. All of these commands are known as control
language

AS400 commands tend to be three letter abbreviations of two or more words put together. For
example the word “work” is commonly used in several commands and is abbreviated as wrk.
Printable output on an AS/400 is known as spool files and commands to work with those are
abreviated as splf— ok so thats four letters but it is a rare exception.
So if we put together Work and Spool Files we ge the command “wrksplf” Work with Spool Files
and it allows you to maintain your printable output that is still residing on the system. And by the
way commands are entered on the command line at the bottom of menus and denoted with the
“===>” symbol.
To see a list of AS400 commands that have been catagorized into groups type in “go verb” on
the command line. As you will see there are *alot* of commands. Ultimately you will probably
only ever use 20% of them, and realistically even for day to day system administration less than
that.

You can also prompt any command by typing it in and pressing the F4 key on the keyboard. This
prompting will display more detail about the command and provide all of the available parameters that go
along with it. Everything that runs on the AS400 is called a job. And all of the jobs run within their own
areas known as subsystems. To see a list of all the jobs currently running on the system you will use the
command wrkactjob which stands for Work with Active Jobs.
Without getting into a bunch of techno jargon, subsystems are a way to run jobs that jobs can be
allocated system resources like memory and CPU processing time. For example printers run in
there very own subsystem called QSPL, which tends to have its own pool of memory allocated to
it. That way others jobs in the system don’t use that allocated memory and vice versa. The
memory can be reallocated easily if need be but that will be covered in another topic.
Out of the box an AS400 will have adequate subsystems configured to get you up and going… as
time goes on your can create more subsystems or change the pre-configured ones if need be.
Lastly let’s take a look at how to shutdown or restart an AS400. Starting up an AS400 or
restarting is know as an Initial Program Load or IPL for short. This is a rather straight forward
process but can take quite a bit of time to complete.

In a very brief nutshell upon startup the system checks everything out and loads up the operating
system and related systems to make the system opertational. During an IPL is most often when
you will experience a hardware failure… not to worry though because most hardware failures
that occur on an AS400 can be replaced while the machine is running. This includes hard disks,
redundant power supplies and even memory.
So to shutdown or IPL a system you will use the Power menu which you access by typing in “go
power” on the command line or alternatively using the Power Down System or pwrdwnsys
command. Most people opt for using pwrdwnsys.

AS400 Packed Data Conversion


Why Your AS/400 Data Looks Like Guacamole…
Sometimes when people transfer data from an AS/400 to Excel or another program they run into
a some data that looks a bit like guacamole, this tends to happen when transferring numerical
data.
Without getting into a lot of boring technical details “packed data fields” are the default standard
for storing numerical data on AS/400s in a format known as EBCDIC. PC based computers use
ASCII and so they don’t always translate across when transferred in there native formats.
The problem is when you bring that data over to the PC world it doesn’t always translate
correctly to ASCII… now this only tends to occur when using the data transfer program built into
Client Access and not when using an ODBC connection or other program which does the data
translation for you behind the scenes.
The symptom is that when you download the data you will see letters in fields where there
should be numbers from 0 through 9. To correct you simply translate these letters or characters
over to the corresponding number as follows:
0 = ‘}’
1 = ‘J’
2 = ‘K’
3 = ‘L’
4 = ‘M’
5 = ‘N’
6 = ‘O’
7 = ‘P’
8 = ‘Q’
9 = ‘R’
Now thats about as easy as duck soup… but it sure can be a pain. Ultimately to “cure” this issue
you will want to get at the data another way and not use the AS/400 Data Transfer portion of
Client Access for this specific table, instead use ODBC and SQL query, import it as part of a
printable report, etc.

What The Software Vendors Don’t Want You To Know…


Everyone wants to get there data into Excel or spreadsheet of choice to slice dice and do
whatever else you need to in a user friendly, powerful program tailor made for data manipulation
and reporting.
Getting data from your AS/400 to Excel used to be a major pain but now its simple and routine
process depending on what your reporting needs are. Simply replicating a table or pulling in a
printed report can be done but if you need more complex functions or selecting slices of data
from a large table you will want to get some third party software which will make this process
easy.
Without the use of expensive third party software there are essentially two ways to pull data from
an AS/400 over into your Excel spreadsheets.
The first method utilizes the data connection wizard built into Excel and an ODBC driver to
query the database tables. Yes, Excel has a feature built right into it for querying databases (not
just your AS/400) and storing the resulting data sets in your spreadsheets!
The AS/400 and iSeries ODBC driver comes with Client Access and is available as an option
when you install Client Access on your PC. Alternatively there are some other vendors out there
that sell ODBC or OLE drivers for connecting to your AS/400.

Utilizing the AS/400 ODBC driver you then use the Excel Data Wizard to open a connection to
your system and pull down data. Alternatively you can use an Access database and create linked
tables (again utilizing the ODBC driver) and then query and report against them.
After using Excels data connection wizard (as shown above) you simply just import the AS/400
data into your desired spreadsheet page using the data import option which will then connect to
your AS/400 ODBC data connection and pull down the data tables.
The default for this type of connection is to download the _entire_ database table… unless you
want this there are some additional options you can use to add query constraints to pare down the
data selection.
The second method is to take an existing spool file report, download it as a text file using iSeries
Navigator and then importing it right into Excel. Excel handles this perfectly except you have to
add in the column breaks and then cleanup the page headings.

When using the Excel Text Import wizard to import AS/400 data contained in spool files make
sure you select fixed width and not delimited field data. The alignment of the columns may take
a little adjusting.

Anda mungkin juga menyukai