You are on page 1of 3

AS/400:

Application System 400


Application : is a product which will process the user request and will provide the requested
information to the user on the screen
This requires
1) GUI( Graphical user interface)
2) HLL (High level language)
3) DBS( Data base)
System:
System is something which will have everything in it.
Here System means which will have all the 3 facilities mentioned above.

1) GUI:
We Can use SDA tool to design the screens
2) HLL:

We have RPG (Report program language) as the high level language


and CL (control language) which is a semi HLL which wont do all the data manipulations(
Read,insert,delete,update) but which can drive the rpg programs.
Cl is a basically a driver program which calls rpg programs for processing the user request

3)DBS:

We have DB2/400 as the data base in AS/400 System

How do we create applications on As/400 System?

We store the data in DB2/400 and design the screens for user interaction using SDA tool and we do use
RPG programs for processing the user requests, These rpg programs are being driven by the CL
programs.

Getting Started with Db2/400:


Stop thinking of everything else and focus on DB2/400 Only.

Data base is the place where we store the data as files:

What is a file?
File is nothing but collection of records
Record?
Its nothing but collection of columns(fields)
Column?
Its nothing but a variable with defined attribute.

If we want to store a data of employee...


If I were a clerk, I'll be maintain g a note book and I would use a scale and give margins for each filed,
EMPNO i'd give 5cm space for empname 15cms, empsal again 5cms
Like wise I would draw a table.
All that I did is nothing but defined the data structure using the scale.
Same thing we are supposed to do when creating the data base files

designing a file means giving the margins with a scale and giving the attributes of the field,
File Design mainly involves defining the data structure and atributes.
For the same example:
EMPNO i'd give 5cm space for empname 15cms, empsal again 5cms

EMPNO 5 numeric integer


Empname 15 characters
Empsal 5 numeric floating

total record length is 25


where 1st 5 digits occupy empno,next 15 name,next 5 is salary.

The next question araises is where to give this source code?

In AS/400 We have a tool called. SEU(Source Entry utility) We can use this tool to give ur souce
codes in different Sourcememebers

Library and a Source file:


AS/400 is an object oriented system

Object : Is something which occupies space on the hard disc


Everything in AS/400 is an object that means everything occupies space...file objects, program objects,
…...
Library:
Library is an object of *Lib which is used to store different objects( U can consider this as a huge
object like a folder which can have different files)
U cant keep a library in an other library...library is the biggest

Source file:
Source file is a file which exists in a library and this source file can contain lot of source members in it.
Source Member:

Source member is what that contains ur Source code.

So We can give any source code in a source member ...When we start SEU tool it will be asking for
this path

As we are aware path Should be Library/Source file/Source member

WRKMBRPDM is the tool that will let you work with the Members using program development
manager.
This will help u to work with souce codes.
Now we are coming back to creating Files in Db2/400

to create it we should STRSEU library/sourcefile/sourcemember

and in that source member we should be giving the source code.

What are the different sort of files in Db2/400

Basically two Files 1) Physical Files


2) Logical files

Logical files again devided intotwo types


1) Non Join Logical Files
2) Join Logical files
Join logical files are again into 3 types
1) Natural Join
2) Left outer Join
3) Self Join

Physical file: Physical file is an object of type *file which holds the real data
Logical file: is an object of type *file which holds No Data but provides an access path on to the PF,.

Example: Physical file is like a book which holds the data


and logical file like an Eye which gives access to whatever u want to look at

You might also like