Introduction To As/400 Environment: Report Program Generator
Introduction To As/400 Environment: Report Program Generator
Introduction To As/400 Environment: Report Program Generator
Content
-
the
early
1960s
language
was
introduced
By
the
late
1960s
it
released
its
System/3
computer
During 1970s
In 1988
RPG/400
was
minor
operations
an
enhancements.
In 1994
RPG
ILE
(Integrated
Language Environment)
programming
2.
2.1.
will
be
displayed
as
shown
Help File: An online help is available by pressing F1 at any part of the AS/400 screen.
WRK* Command: list all commands begin with WRK.
Below is the example of commands begin with WRK. You can see more on the next page.
below:
Alternatively, if you do not know the menu name, you can search the menu by typing GO follow with
F4.
If *All is entered at Menu, you will be able to view a list of menu available in your Library List (*LIBL).
You can see more on the next pages
+ System Request Menu: press Shift with Escape key Esc -> Enter
MESSAGES: There are commands to send messages: Send Message (SNDMSG) and Send
Break Message (SNDBRKMSG)
+ SNDMSG (Send Message) Command: is used to sending a message to specified User
Profile. You need to enter an User Profile or User ID at To User Profile column to send message
that you have enter at Message text
If you want receiver to get reply your message, set parameters as follow:
1) Message Type: *INQ
2) Message queue to get reply: YOUR PROFILE
+ DSPMSG (Display Message) Command: is a command to display message in your work station
and your user profile message queue.
2.2.
File structure
2.2.1.
2.2.2.
2.2.3.
Library
A library (*LIB) on the AS/400 is used to group other related object in a meaningful manner to the
user.
Object
Object is a file in AS/400 and its stored in a library.
Some type of object:
*CMD
*MENU
*LIB
*FILE
*PGM
*MODULE
Member
Members contain source statementand its stored in the object. Some type of member:
CBL: COBOL
CLP: Control Language Programming
CMD: Command
DSPF: Display file
PF: Physical File
LF: Logical File
PRTF: Printer File
RPG: RPG III source code
RPGLE: RPG IV source code
TXT: Text file
4.
AS/400 Utilities
Four main utilities provided in OS/400:
Source Entry Utilities (SEU) - You can use the Source Entry Utility (SEU) to enter and change
source in a source file.
Screen Design Aid (SDA) - Pgrammers can use SDA to create, design menus, display formats
(screens).
Data File Utilities (DFU) - is a data file viewer and editor that is included in the i/OS operating
system.
Report Layout Utilities (RLU) - is an on-line tool to design reports.
Next session introduce about SDA Tool. The others will be discussed later.
5.
Design/create screen
Design/create menu
Test the display files (screen).
You need entry source file name (RPG01D), library and member and then press enter to continue
designing.
You can entry record name (DISPLAY) and types record (RECORD) and then press enter. You can see
screen and design it.
Enter the following keyword into the screen at the specified postition:
-
*DATE
*TIME
*USER
*SYSNAME
DESIGN SCREEN
F3=EXIT
F12=CANCEL
*DATE, *TIME, *USER, *SYSNAME is 4 systems variables that alow you retrieve current date, current
time, current user, current system name from system values and display them on screen.
To display text on screen, you need to put it between 2 character .
Each screen can use function keys from F1->F24, you can define what function to do in your program.
On the screen, you need to show meaning of function keys to guide
-
F9=Select: to select additional records to display on the Design Image work screen.
F15=Subfile Prompt: allows you to change the subfile line (SFLLIN) and subfile page(SFLPAG)
sizes
F18=Tab
F19=Back Tab
F22=System command
For example: When you press F4, you can see screen as belows:
You can use the following command to add attribute or color to this screen.
Add
Remove
Attribute
-H
High intensity
-R
Reverse image
-S
Column separators
-B
Blink
-N
Nondisplay
-U
Underscore
-A
Remove allAttribute
Add
Remove
Color
CB
-CB
Blue
CG
-CG
Green
CP
-CP
Pink
CR
-CR
Red
CT
-CT
Turquoise
CW
-CW
White
CA
-CA
Remove all
Press F3, select option 1 and then press Enter to save work since last Enter and exit work screen.
The next step to save DDS source is press F3 and select Y at Save DDS source line and then press
enter twice to confirm saving and exiting.
3.1.
Design Menu
Press enter to continue designing menu and then entry information as following screen:
Press enter to confirm information and then press F3 twice to save and exit designing screen.
Press Enter
You must entry file name, library name and member name and then press enter:
Menu that you create have MNUDDS type. This source code only is designed screen of menu.
You use option 5 to display source code of this member.
Do the same thing, you will see source code of MYMENUQQ as followings:
3.2.
Option 3 at SDA menu is to display the screen design after you have compiled it as an object.
You have to entry display file name, library name and record to be tested name, and then press enter.
You can also test display file by using WRKMBRPDM and then select option 17.
Press enter: