Display Files

Embed Size (px)

Citation preview

  • 8/22/2019 Display Files

    1/26

    Jul-22-02 Display Files Page : 1/26

    Display Files

    Course Code: AS/400

    Version No: 1.0

    Date of Release: Jul-22-02

    Author: Jincy Rose Joseph

  • 8/22/2019 Display Files

    2/26

    Jul-22-02 Display Files Page : 2/26

    Objectives

    To familiarize with Display Files.

  • 8/22/2019 Display Files

    3/26

    Jul-22-02 Display Files Page : 3/26

    Prerequisites

    Basic knowledge of RPG programming concepts.

  • 8/22/2019 Display Files

    4/26

    Jul-22-02 Display Files Page : 4/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

  • 8/22/2019 Display Files

    5/26

    Jul-22-02 Display Files Page : 5/26

    Screen Design Aid(SDA)

    Screen design aid (SDA) can be used to perform thefollowing 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 andmenus.

  • 8/22/2019 Display Files

    6/26

    Jul-22-02 Display Files Page : 6/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.

  • 8/22/2019 Display Files

    7/26

    Jul-22-02 Display Files Page : 7/26

    Some of the terms that you encounter while using SDA.

    Keyword

    Keywords are used to define displays, fields,

    records, and files. Field

    A fieldis an item that you specify for defining a

    display.

    SDA Terminology

  • 8/22/2019 Display Files

    8/26

    Jul-22-02 Display Files Page : 8/26

    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.

    SDA Terminology(contd..)

  • 8/22/2019 Display Files

    9/26

    Jul-22-02 Display Files Page : 9/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.

  • 8/22/2019 Display Files

    10/26

    Jul-22-02 Display Files Page : 10/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

  • 8/22/2019 Display Files

    11/26

    Jul-22-02 Display Files Page : 11/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.

  • 8/22/2019 Display Files

    12/26

    Jul-22-02 Display Files Page : 12/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.

    2. Specify the name of the source file, library, and member

    on the Design Screens display

    3. Indicate that you want to create a new record on the Work

    with Display Records display

  • 8/22/2019 Display Files

    13/26

    Jul-22-02 Display Files Page : 13/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.

  • 8/22/2019 Display Files

    14/26

    Jul-22-02 Display Files Page : 14/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

    b. Character field

    +I(5) input field

    +O(5) output field+B(5) both input/output

  • 8/22/2019 Display Files

    15/26

    Jul-22-02 Display Files Page : 15/26

    Editing a field

    The edit code specifies how the numeric value isdisplayed. To edit a field on the Design Image workscreen:

    For naming a data field, type a question mark(?)

    immediately before the data field and press enter.Type an asterisk (*) immediately before the datafield and press Enter. The Select Field Keywordsdisplay appears.

    To specify that you want to edit keywords, type Y(Yes) in the Editingkeywords prompt and pressEnter. The Select Editing Keywords displayappears.

  • 8/22/2019 Display Files

    16/26

    Jul-22-02 Display Files Page : 16/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 Editcode prompt and press Enter.

    Select the EDTCDE keyword for most of the

    numeric fields and the EDTWRD keyword forfixed-format fields, such as currency symbols and

    asterisks.

    Press Enter on the Select Field Keywords display.

    The Design Image work screen reappears.

  • 8/22/2019 Display Files

    17/26

    Jul-22-02 Display Files Page : 17/26

    Adding a Message Identifier

    To define message IDs on the Define Message ID display,you specify a message prefix, identifier, and conditionindicators.

    To add a message identifier:

    Type an asterisk (*) immediately before the datafield on the Design Work image screen and pressEnter. The Select Field Keywords displayappears.

    To specify that you want to define a message ID,type Y (Yes) in the MessageID(MSGID) prompton the Select Field Keywords display and pressEnter. The Define Message ID display appears.

  • 8/22/2019 Display Files

    18/26

    Jul-22-02 Display Files Page : 18/26

    Adding a Message Identifier(contd..)

    Do the following on the Define Message ID display:

    Type MSG in the Messageprefixprompt. Type 0001 in the Messageidentifierprompt. The

    message prefix and message identifier make upthe identifier used in the message file.

    Type USRMSGS in the Messagefile prompt. Themessage file contains the messages you areusing.

    Give the appropriate library name in the Libraryprompt.

    Press Enter. The Select Field Keywords displayreappears.

  • 8/22/2019 Display Files

    19/26

    Jul-22-02 Display Files Page : 19/26

    Adding a Message Identifier(contd..)

    Type Y (Yes) in the MessageID(MSGID) prompt

    on the Select Field Keywords display and pressEnter. The Work with Message ID Keyword

    display appears with the message you defined.

    Press F12 (Cancel) until the Work with DisplayRecords display reappears.

  • 8/22/2019 Display Files

    20/26

    Jul-22-02 Display Files Page : 20/26

    To save the DDS created by SDA for this display and createthe 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 Specifyadditionalsaveorcreateoptionsprompt and press Enter. The Specify Additional

    Options display appears.

    Saving the DDS

  • 8/22/2019 Display Files

    21/26

    Jul-22-02 Display Files Page : 21/26

    Subfiles

    Subfiles can be specified in the DDS for a display-

    device 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

  • 8/22/2019 Display Files

    22/26

    Jul-22-02 Display Files Page : 22/26

    Subfiles(contd..)

    Subfile control part defines:

    Size of the subfile

    User messages

    Function keys that the user can useFixed portions of the display

  • 8/22/2019 Display Files

    23/26

    Jul-22-02 Display Files Page : 23/26

    SDA Menu

    Menu consists of two different source file members .

    The DDS source member

    The command source member

  • 8/22/2019 Display Files

    24/26

    Jul-22-02 Display Files Page : 24/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.

  • 8/22/2019 Display Files

    25/26

    Jul-22-02 Display Files Page : 25/26

    Creating a Window

    To create a window record :

    a. Type in the Newrecordprompt.

    b. Type WINDOW in the Type prompt to specify that the

    record is a window.

    Four record-level window keywords:

    WINDOW

    WDWBORDER RMVWDW

    USRRSTDSP

  • 8/22/2019 Display Files

    26/26

    Jul-22-02 Display Files Page : 26/26

    References

    IBM Manual - ILE RPG/400 Reference

    http://publib.boulder.ibm.com/