You are on page 1of 26

Display Files

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

Screen Design Aid(SDA)


Screen design aid (SDA) can be used to perform the following tasks:

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

Relationship between Display Files, Records, and Fields


A display file contains one or more records. Each record specifies all the characteristics of one display. Each display is composed of fields that are designated as input, output, both (input and output), or constants.

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

Using the STRSDA Command


The Start SDA (STRSDA) command is the primary command for the IBM AS/400 screen design aid (SDA) utility. You can use this command in the System/36 and System/38 environments, as well as in the AS/400 environment.

Jul-22-02

Display Files

Page : 9/26

Common functions to all SDA work screens


Add constants to the work screen Change constants on the work screen Change the length of a constant Add message constants Display attribute positions Center fields

Delete fields

Jul-22-02

Display Files

Page : 10/26

Common functions to all SDA work screens(contd..)


Move fields Copy fields Make multiple changes Specify display attributes Remove display attributes Delete display attributes Specify color Remove color from a field.
Jul-22-02 Display Files Page : 11/26

Creating a Display file


To create a new display file: 1. Select option 1 (Design screens) from the Screen Design Aid (SDA) menu and press Enter. The Design Screens display appears. Specify the name of the source file, library, and member on the Design Screens display Indicate that you want to create a new record on the Work with Display Records display

2. 3.

Jul-22-02

Display Files

Page : 12/26

Creating Simple Displays(contd..)


For creating a record :

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

Adding a Message Identifier


To define message IDs on the Define Message ID display, you specify a message prefix, identifier, and condition indicators. To add a message identifier:

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

Adding a Message Identifier(contd..)


Do the following on the Define Message ID display:

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

Adding a Message Identifier(contd..)


Type Y (Yes) in the Message ID (MSGID) prompt on the Select Field Keywords display and press Enter. The Work with Message ID Keyword display appears with the message you defined. Press F12 (Cancel) until the Work with Display Records display reappears.

Jul-22-02

Display Files

Page : 19/26

Saving the DDS


To save the DDS created by SDA for this display and create the display file:

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

The DDS source member The command source member

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

You might also like