0% found this document useful (0 votes)
14 views

Mid Assessement (Based On Display File - RPGLE)

The document provides requirements for creating an RPG program with multiple screens to display and manage company data. It involves: 1) Creating a display file and main program to display up to 8 company records on a screen using subfiles and allow viewing additional records with option 5. 2) Creating a physical file for company data with fields like ID, name, date, type and employees. 3) Creating separate screens - one for viewing records and another for data entry. 4) Creating an order processing system with a subfile screen to enter, view, edit and delete orders from a physical file, with validation screens for edits and deletions.

Uploaded by

Rishu Sinha
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Mid Assessement (Based On Display File - RPGLE)

The document provides requirements for creating an RPG program with multiple screens to display and manage company data. It involves: 1) Creating a display file and main program to display up to 8 company records on a screen using subfiles and allow viewing additional records with option 5. 2) Creating a physical file for company data with fields like ID, name, date, type and employees. 3) Creating separate screens - one for viewing records and another for data entry. 4) Creating an order processing system with a subfile screen to enter, view, edit and delete orders from a physical file, with validation screens for edits and deletions.

Uploaded by

Rishu Sinha
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Q1.

Create a Display file and code for the working of display file in rpg using the
feature of Sub-Routines and use subfiles to
display 8 records on the screen.

Use an option field Option - 5 to Display Records

Use STRDFU for Adding Company Data in physical file

Physical File Name : COMPANY


Logical file Name : COMPANYLA keyed with Company Id
Main Program Name : COMPMAIN
Display File Name : COMPDSPF

Physical File Company:-

Field Length Type

CID 2 A(CHAR)
CNAME 20 A(CHAR)
CESTDATE 12 A(CHAR)
CTYPE 10 A(CHAR)
EMPNO 6 A(CHAR)

Screen 1
___________________________________________________________________________________
______________________________

*Date COMPANY DETAILS *Time

Type Options and press enter:

5- Display

Options COMPANY COMPANY COMPANY COMPANY


NO. OF
ID NAME EST. DATE TYPE EMPLOYEES

___ ___ ____________ ________ _________


____________

___ ___ ____________ ________ _________


____________

___ ___ ____________ ________ _________


_____________

___ ___ ____________ ________ _________


_____________

___ ___ ____________ ________ _________


_____________

___ ___ ____________ ________ _________


_____________
___ ___ ____________ ________ _________
_____________

___ ___ ____________ ________ _________


_____________

F3-EXIT F5-REFRESH

Screen 2 - To Display records make one new screen and all fields should be in
output mode.

2. Create a PF Order with field- Order Number(6,0), Product name(15), Customer


Name(20), Product quantity(4), Customer Address(30) and insert data in it.

i) Screen 1 (subfile) with all PF fields displayed on the screen ( F3 - Exit, F5


- Refresh, F6 - Create, F12- Cancel )
Options Available on screen 1 :- 2-Edit 4-Delete 5- Display

ii) For F6 - Create a window screen with all fields as a input. After entering
the data, all data should be loaded on subfile screen and
data also added in the PF. ( F3 - Exit , F12 - Cancel )

iii) Create new screen i.e. Screen 2 for options 2 and 5.


For option 2 - Order Number should be protected and except order number all
fields should be editable. ( F3 - Exit, F5 - Refresh, F12 - Cancel )
For Option 5 - All fields should be protected.None of them are editable
( F3 - Exit, F12 - Cancel )

iv) When you take option 4, it should delete records in Pf and on subfile screen.

For confirmation of deletion make one new screen and if you give response as
'Y' then it should delete and
if you give 'N' as reponse then it should not delete

You might also like