Anda di halaman 1dari 32

AS400

What is AS400?
AS400 A closer look.
Inside AS400.
Know AS400
Learn AS400 19 Sep 2002 3
What is AS400?
AS400 Application System/400.
First introduced by IBM on June 20th, 1988.
AS/400 is a popular family of mid-sized computer
systems far more advanced in power and functionality
compared to its counterparts.
Earlier IBM models of the System/36 and System/38
have been replaced by the AS/400 systems.
In October of 2000, IBM rebranded the AS/400 and
announced its name as the IBM iSeries 400, which is a
web server, to keep in tune with the fast paced demands
and changes of the Internet and the e-business.
Learn AS400 19 Sep 2002 4
AS400 A closer look
Operating system OS400.
Built in database DB2/400.
Main programming language (~95%) RPG.
The AS/400 utilizes a green screen interface.
AS400 has a complete and menu driven interface.
You can also execute commands directly from command
line provided in any screen.
Learn AS400 19 Sep 2002 5
Inside AS400
Features of AS/400
An Integrated Architecture Ready to use
machine.
An Integrated Relational Database Manager.
An SLS Single Level Storage system.
The IFS.
Object based architecture.
Learn AS400 19 Sep 2002 6
Inside AS400 Integrated Architecture
Unlike traditional systems that generally separate their database and
application development tools from their operating system, the
AS/400 offers a full-fledged operating system that integrates most
aspects of the machine and user interface.
OS400 comes with a wide variety of built-in middle-ware including
Relational database system.
Internet server.
Spooling and print handling.
Communication capabilities like SNA, TCP/IP, POP3 Mail
server.
In short AS400 comes in ready to start and you dont need a
specialized system integrator.
Learn AS400 19 Sep 2002 7
Inside AS400 Relational Database
Integrated Relational Database Manager is one of the
most significant facilities provided by the AS/400 system.
Database manager is integrated into the operating
system OS400,
Access to the database is implemented in the
operating system itself. Database can be accessed
from command line using OS400 commands, directly
from programs or by using SQL statements.
Learn AS400 19 Sep 2002 8
Inside AS400 Single Level Storage & IFS
Single Level Storage system.
All of the storage is automatically managed by the
system.
No user intervention is ever needed to take full
advantage of any storage technologies.
Objects are accessed by name, never by address.
IFS Integrated File System.
IFS is a part of OS/400 that supports input, output,
and storage management similar to the PC and
UNIX operating systems.
Learn AS400 19 Sep 2002 9
Inside AS400 Object Based System & Security
Object based System.
In AS400 everything is an Object including data,
programs, files, and so on.
Objects are subject to object rules. That decide what
can be read, changed, deleted, or added, and by
whom or what.
Security
OS/400 has a single integrated security model
shared by the operating system, database, mail,
systems management, the Internet, and
communications functions.
AS/400 system checks object rules before it touches
any object.
AS400 Commands.
Library & Library List.
Files.
AS400 Basics
Learn AS400 19 Sep 2002 11
Concept of Objects
Object is a self-contained abstraction of an entity
In AS/400 almost everything that exists on the system
(except source members such as program and file
sources) are objects
When a source is compiled, a separate object
independent of source is created.
An object consists of its name, object type, the name of
the owner, authorization, status and data.
Objects are distinguished from one another not only by
their names but also by their types.
Learn AS400 19 Sep 2002 12
AS400 commands
AS400 provides a complete set of command with which
you can interact with the system.
AS/400 operating system is consistent in its presentation
and names.
Commands have names of up to 10 letters.
Typically taking three letters of each word.
For example, to work with active jobs, the command
is DSPMSG. DSP is the AS/400 abbreviation for
display" and MSG is the abbreviation for message"
Learn AS400 19 Sep 2002 13
AS400 Commands Tips
The abbreviations usually are three letters.
But there are few exceptions.
For FILE, we use F. But this is consistent throughout
the system.
ADD Add
CFG Configure
CHG Change
CPY Copy
CRT Create
DLT Delete
DSP Display
GO Go to a Menu
RMV Remove
STR Start
USR User
WRK Work with
DEV Device
DEVD Device Description
F Files
LIB Library
OUTQ Output Queue
MSG Message
SPLF Spool File
WTR Writer (Printer)
Learn AS400 19 Sep 2002 14
AS400 Commands Use Menus
Dont Know the Command?, Use AS/400 menu.
AS400 has a complete menu driven interface.
Use GO VERB from a command line. This menu lists all
AS/400 verbs.
If you already know the verb, use GO CMD<VERB>
Say, You want to see all commands with ADD use
GO CMDADD.
GO CMDWRK for all "work" commands.
GO CMDDSP for all "display" commands.
GO CMDSTR for all "start" commands.
Learn AS400 19 Sep 2002 15
Library
Library is part of the IFS QSYS.LIB
Objects like Files, Programs, etc are placed in Library.
A Library cannot have another library.
All user created libraries are placed in QSYS.
System Libraries have operating system objects like
AS/400 commands and menus.
User Libraries are the libraries created by the users.
No two objects with the same name and the same type
can exist in the same library
Learn AS400 19 Sep 2002 16
Library List
Library list on the AS/400 is similar to the "path" on PC's.
Mainframe programmers may compare it to the "steplib"
or "joblib".
It defines the order of libraries that the operating system
uses to find objects.
Library list can have three type of entries.
SYS libraries have operating system objects.
Current Library Any library can be specified as
current library.
The USR libraries created by the user.
Learn AS400 19 Sep 2002 17
Library Related Commands
CRTLIB Create a library
RMVLIB Delete a library
DSPLIBL Display complete library list.
EDTLIBL Change your USR libraries in library list.
CHGCURLIB Set/change your current library.
CHGCURLIB *CRTDFT to reset the current library.
Impact of LIBL on WRKOBJ Try the following
WRKOBJ <Library/><Object>
WRKOBJ <Object>
WRKOBJ *LIBL/<Object>
WRKOBJ *ALL/<Object>
Learn AS400 19 Sep 2002 18
Library List Sample Library List
Sample Library list
QSYS SYS System Library
QSYS2 SYS System Library for CPI's
QHLPSYS SYS
QUSRSYS SYS
TESTFILES CUR Library for Test Files
TESTPGMS USR Library for Test Programs
GLFILES USR Library for Production G/L Files
GLPGMS USR Library for Production G/L Programs
PRPGMS USR Library for Production P/R Programs
PRFILES USR Library for Production P/R Files
TAATOOL USR Library for User Tools
QGPL USR General Purpose Library
QTEMP USR
SYS Libraries
Current Library
User Libraries
Whenever you key in a command, call a program or
go to a menu, the AS/400 will look for what it needs
in those libraries and in that sequence.
Learn AS400 19 Sep 2002 19
Files
Files are objects that exist in Libraries.
The database (DB2/400) objects in AS400.
File name can be of 10 chars.
Files are of two types.
Data Files.
Source files.
Files can be created with a structure / record format or it
can be a flat file.
Files can be Indexed using Keys. Keys are access Path
to records.
Data in the file can be accessed using SQL, CL
commands, program op-codes ...etc.
Learn AS400 19 Sep 2002 20
Files Members in Files
In Physical file, data is stored in Members.
A Physical File can have one or more members.
All Members of the Physical file will have the same
structure.
Members are a way of grouping the data in a physical
file.
E.g. Order file can be grouped based on Month.
Members improve performance.
You can add members through programs.
Learn AS400 19 Sep 2002 21
Files Library, Files and Members
Library / files (members)
User
Library
File 3 Member 2 Member 3 Member n Member 1
File 2 Member 2 Member 1
File 1 Member 1
Object 1
Object 2
Object 4
Object 6
Object 5
Object 3
Library
File 1
Member 1
Record 2
Record 1
Record 3
Member 2
Record 2
Record 1
File 2
Member 1
Record 1
Learn AS400 19 Sep 2002 22
Files Related Commands
CRTPF - Create Physical File.
CHGPF - Change Physical File attributes.
ADDPFM - Add Physical File Member.
DSPPFM - Display Physical File Member.
DLTF - Delete File.
Learn AS400 19 Sep 2002 23
Files Related Commands CRTPF
CRTPF used to create files.
Flat file by specifying the record length.
Files with record format By describing the fields
and field attributes in the DDS (Data definition
Specification).
Important Default Values You may change these.
1 Member Same as file name.
Number of records 10,000.
Number of increments 3.
Increments 1000 records each.
Learn AS400 19 Sep 2002 24
Files Source Physical Files
Source Physical Files To store Source code, text.
SRCPF is same as any other file.
SRCPF has Fixed record format with three fields.
Sequence Number.
Source Data.
Modified Date.
Can have multiple members.
Each member is the source code for a program.
Source files can have any name. But conventionally the
names start with Q and end with SRC.
QCLSRC, QDDSSRC, QRPGSRC, QRPGLESRC etc.

Learn AS400 19 Sep 2002 25
Files Source Physical File Commands
CRTSRCPF to create Source PF.
Default Record length is 92.
For languages like RPGILE, you need 112 record
length, as the source data length is different.

The source statements are needed only for the compiler.
The compiled programs are the objects that are actually
run on the AS/400.
Use WRKMBRPDM to work with source (members) in
SRCPF.
Use SEU (Source Entry Utility) to edit the source.
Learn AS400 19 Sep 2002 26
Files Types of data Files
PF Physical File Where the data is stored.
Types of files
Physical Files (PF).
Logical Files (LF).
o Single Record Format Logical File.
o Multiple Record Format Logical File.
o Join Logical File.
Display Files (DSPF).
Printer Files (PRTF).
Learn AS400 19 Sep 2002 27
Help in AS/400
AS/400 has extensive, friendly help built into every
command.
Each command has prompt facility that will help you
enter the parameters for the command.
Type the command and press F4 to get the prompt.
To see the complete list of parameters, Press F10
(Additional Parameters) on prompt Screen.
To learn more about any command, type in the number
of the command from the menu and then hit F1.
Or
Take Prompt for the command, and hit F1 on the
heading.
PDM Program Development Manager.
SEU Source Entry Utility.
DFU Data File Utility
Programming on AS400
Learn AS400 19 Sep 2002 29
PDM
PDM Program Development Manager.
PDM provides a way to enter program source statements
and then to compile the statements into executable
programs.
Using PDM you can work with libraries, Objects,
members. (Also work with projects, groups, parts.)
STRPDM Start PDM to use options from Menu.
WRKLIBPDM, WRKOBJPDM, WRKMBRPDM directly
takes you to the respective screens.
PDM remembers the last parameters specified, and will
use the same, unless you change them on the prompt
screen.
WRKMBRPDM Vs WRKOBJPDM.

Learn AS400 19 Sep 2002 30
PDM Work Member PDM
WRKMBRPDM the most commonly used command.
Change Library and File to go to your file.
Use positioning field to locate your source code/member.
Displays Member Name, Type & Description.
Options on the top of the screen.
2 Edit.
3 Copy.
4 Delete. (No UNDELETE facility).
5 Display.
14 Compile.
Function Keys At the bottom of the screen.
F6 Add member.
F11 Change Layout.
Learn AS400 19 Sep 2002 31
SEU
The Source entry utility An AS400 source editor.
STRSEU Start SEU.
SEU is invoked on any edit / browse option for the
sources.
Source (Code) Vs Object (Executable / db File ...etc).
SEU is for source, not for object.
SEU checks syntax based on the type of the source.
SEU allows prompt (F4) facility to help coding.
Learn AS400 19 Sep 2002 32
DFU
Data File Utility
Tool for populating database files with data
Provides a convenient and easy way to change and add
records to a physical (or logical) database files.
DFU can be assessed by using STRDFU command or by
choosing option 18 from the Work with Objects using
PDM Screen.
It can also be assessed using the command UPDDTA

Anda mungkin juga menyukai