Getting Started with RPGLE #2
This article is the continuation of previous article getting stared with RPGLE.
Let’s add data to the previously created physical file.
Physical file name — MYPF001
1. Data Insertion process
Data can be added to the Physical File using two methods.
1. Using Data file utility screen
2. Using SQL queries
1.1 Through Data file utility screen
Command — STRDFU
STRDFU — → Enter
Select option 5 → Update data using temporary program
Program will be displayed to insert data to the physical file (MYPF001)
Insert required data; Id, Name and Contact Number and press Enter
After completing data addition press F3, the following screen will be resulted.
Type the choice for End data entry as Y and press Enter.
Get Jananie Perera’s stories in your inbox
Join Medium for free to get updates from this writer.
Data addition process is now completed.
1.2 Data addition using SQL queries.
Other than data file utility program data can be added to the screen using ordinary SQL insert queries.
To write SQL queries, SQL statement window should be used. SQL statement screen can be access by the command “STRSQL”.
The following screen will be loaded. This screen can be used to write SQL queries.
2. Accessing the Inserted Data
To access the data that we have inserted, we have two methods.
1. Using SQL Select
2. Using Run query
2.1 Using SQL Select
As explained above we can use SQL Statement screen to write SQL select quires to retrieve data from the table.
2.2 Using Run query
Run query can be used as follows.
You will get the same output as the select query.
This is the end of the second article. If you like my contents, please consider following me. 😀







