Display File in RPGLE- Part1
Display files are the alternates for the user interface in AS400. The present GUI can be made in AS400 by using Display Files. Using it we can create menus, screens to interact with users and load data into it.
In this blog we will cover
- Create Display File
- Screen Design Aid
- Create Record in Display File
- Operations in Display File
- Save and compile the file
Create Display File
In your library, create a source physical file called as QDDSDSPF. Inside this physical file display files are kept by convention.
Press F6, to create a display file.
Press Enter and save the file.
Screen Design Aid
Screen Design Aid is used to design the display file in very user friendly manner.
In extra menu options( to show extra (shift+F11)=> F23 ), Screen Design Aid Opt=17 can be used to edit the Display File.
Press Enter, to enter into the file
In this we can design screens which can be many types like subfile, windows, record, etc..
Create Record in Display File
Under the RECORD column give the screen name.
Press Enter, to choose the SCREEN01’s type
Here, we can see the Type… can be 9 types. In this blog we are going to cover RECORD.
To know about types even more, place the cursor on Type… Press F1.
F1 is used to get information of the field. So you can use it wherever you need extra information over a field.
Press Enter, you enter into the screen!
Operations in Display File
Insert text into screen
Between the single qoutes the text should be give.
Press Enter.
Delete Text from screen
Use d infront of the text.
Press Enter.
Should not use backspace or delete or insert in display screen. You can use space bar to delete. The screen crashes totally. If you wanr to reverse the changes you made, unsave the file (F3- Opt=2).
Display Margin
Keep your cursor, from where the margin should start
Press shift + F2.
To remove the margin, Press shift+F2 again.
Center Alignment
Before the word type ‘a’ and on the first letter of the word replace it with ‘c’.
Press Enter.
Move text to left
To move text to left use ‘<’ operator
Press Enter.
Move text to right
To move text to right use ‘>’ operator
Press Enter.
Move text between rows
Enclose the text with ‘-’ hypens and place the ‘=’ in the place where the text needed to be placed.
Press Enter.
Display today’s date, time and user
*date, *user, *time displays the current date, user id and time respectively.
Press Enter.
By convention, Date and time should be placed in top right corner and program name should be placed in top left corner.
Save and compile the file
To save file
Press F3.
Press Selection=1 to save the file. Press Enter.
To compile file
Press Enter.
Make sure the below fields are Yes( Y ).
Save DDS source…. Y
Create disply file…. Y
If it shows completed successfully, then press enter.
Now your display file is ready.
You can also compile the display file by Opt=14.
Press Enter to compile.
Delete existing object….. Y.
Your display file will be compiled.
Ending Note
I will follow up with attributes and indicators used in display file in my next blog — Display File in RPGLE- Part2.
Stay happy and cheers❤
To stay updated with the blogs please follow Life@Twenty. It will really really make me to love my passion even more and more.