Professional Documents
Culture Documents
Course Code: AS/400 Version No: 1.0 Date of Release: Jul-22-02 Author: Jincy Rose Joseph
Jul-22-02
Display Files
Page : 1/26
Objectives
To familiarize with Display Files.
Jul-22-02
Display Files
Page : 2/26
Prerequisites
Basic knowledge of RPG programming concepts.
Jul-22-02
Display Files
Page : 3/26
Course Outline
SDA Relationship between Display files, Records and Fields SDA Terminology Using STRSDA command Common functions to all SDA work screens Creating simple displays Creating/Editing fields Message Identifier Subfiles, Menu and Window
Jul-22-02
Display Files
Page : 4/26
Design a display to help the user navigate through an application program Design a menu to present a list of options from which the user makes a selection Create online help information for displays and menus.
Jul-22-02 Display Files Page : 5/26
Jul-22-02
Display Files
Page : 6/26
SDA Terminology
Some of the terms that you encounter while using SDA.
Keyword Keywords are used to define displays, fields, records, and files. Field A field is an item that you specify for defining a display.
Jul-22-02
Display Files
Page : 7/26
SDA Terminology(contd..)
Record All the fields on a display are grouped in a record. Member A member stores DDS statements. File A display file that contains compiled DDS.
Jul-22-02
Display Files
Page : 8/26
Jul-22-02
Display Files
Page : 9/26
Delete fields
Jul-22-02
Display Files
Page : 10/26
2. 3.
Jul-22-02
Display Files
Page : 12/26
Give a name for the record and also specify the type of record as Record ,SFL etc. Design the screen in that record Save the DDS and create the display file.
Jul-22-02
Display Files
Page : 13/26
To define a field
Eg :To define a numeric/character field of size 5 : a. Numeric field +3(5) input field +6(5) output field +9(5) both input/output Character field +I(5) input field +O(5) output field +B(5) both input/output
b.
Jul-22-02
Display Files
Page : 14/26
Editing a field
The edit code specifies how the numeric value is displayed. To edit a field on the Design Image work screen:
For naming a data field, type a question mark(?) immediately before the data field and press enter. Type an asterisk (*) immediately before the data field and press Enter. The Select Field Keywords display appears. To specify that you want to edit keywords, type Y (Yes) in the Editing keywords prompt and press Enter. The Select Editing Keywords display appears.
Jul-22-02 Display Files Page : 15/26
Editing a Field(contd..)
To change the edit code to show commas, zero balances, and no sign for the data field, type 1 in the Edit code prompt and press Enter. Select the EDTCDE keyword for most of the numeric fields and the EDTWRD keyword for fixed-format fields, such as currency symbols and asterisks. Press Enter on the Select Field Keywords display. The Design Image work screen reappears.
Jul-22-02
Display Files
Page : 16/26
Type an asterisk (*) immediately before the data field on the Design Work image screen and press Enter. The Select Field Keywords display appears. To specify that you want to define a message ID, type Y (Yes) in the Message ID (MSGID) prompt on the Select Field Keywords display and press Enter. The Define Message ID display appears.
Jul-22-02 Display Files Page : 17/26
Type MSG in the Message prefix prompt. Type 0001 in the Message identifier prompt. The message prefix and message identifier make up the identifier used in the message file. Type USRMSGS in the Message file prompt. The message file contains the messages you are using. Give the appropriate library name in the Library prompt. Press Enter. The Select Field Keywords display reappears.
Jul-22-02 Display Files Page : 18/26
Jul-22-02
Display Files
Page : 19/26
Press Enter on the Work with Display Records display. The Save DDS - Create Display File display appears. To indicate that you want to specify additional options for creating the display file, type Y (Yes) in the Specify additional save or create options prompt and press Enter. The Specify Additional Options display appears.
Jul-22-02 Display Files Page : 20/26
Subfiles
Subfiles can be specified in the DDS for a displaydevice file to to handle multiple records of the same type on the display. Consists of a subfile record format and a subfile control record format. Subfile part: Selects keywords to process the data Defines fields
Jul-22-02 Display Files Page : 21/26
Subfiles(contd..)
Subfile control part defines:
Size of the subfile User messages Function keys that the user can use Fixed portions of the display
Jul-22-02
Display Files
Page : 22/26
SDA Menu
Menu consists of two different source file members
Jul-22-02
Display Files
Page : 23/26
Window
To create and view a window display:
Create a window record. Define the DDS record-level keywords for the window. View the window on the Design Image work screen.
Jul-22-02
Display Files
Page : 24/26
Creating a Window
To create a window record : a. b. Type <window name> in the New record prompt. Type WINDOW in the Type prompt to specify that the record is a window.
Four record-level window keywords: WINDOW WDWBORDER RMVWDW USRRSTDSP Jul-22-02 Display Files Page : 25/26
References
IBM Manual - ILE RPG/400 Reference http://publib.boulder.ibm.com/
Jul-22-02
Display Files
Page : 26/26