• No results found

Creating a Window

In document Sda (Page 125-129)

This chapter describes how to create a window for a display. In the example in this chapter, you create a window record and select record-level DDS keywords to define the window. You can then work with the window to define fields for the display.

You use the following steps to create and view a window display:

1. Create a window record.

2. Define the DDS record-level keywords for the window.

3. View the window on the Design Image work screen.

Before you can create the window in this example, you must have *CHANGE,

*OBJMGT, and *OBJEXIST authority to the DDS source file QDDSSRC, and

*CHANGE authority to the library QGPL, supplied by IBM.

Creating a Window Record

To create a window record:

1. Select option 1 (Design screens) on the Screen Design Aid (SDA) menu and press Enter. The Design Screens display appears.

2. Specify the source file, and a library and member name on the Design Screen display:

a. Type QDDSSRC in the Source file prompt.

b. Type QGPL in the Library prompt.

c. Type WDW1 in the Member prompt.

d. Press Enter until the Work with Display Records display appears.

3. To indicate that you want to create a new record, type 1 (Add) in the Opt column on the Work with Display Records display and press Enter. The Add New Record display appears.

4. To specify a name and type for the new window record on the Add New Record display:

a. Type WINDOW01 in the New record prompt.

b. Type WINDOW in the Type prompt to specify that the record is a window.

Note: To create a window record with a subfile, you can type WDWSFL in the Type prompt. For more information about window subfiles, see Chapter 5, “Creating Subfiles” on page 63.

c. Press Enter.

The new window record is added and the Select Window Keywords display appears.

Selecting Window Keywords

To select keywords for the window record:

1. Type Y (Yes) in the General keywords prompt on the Select Window Keywords display and press Enter. The Select General Keywords display appears. In this display, you choose from the following four record-level window keywords:

WINDOW Displays a record format inside a window. The parameters for the WINDOW keyword can be position attributes or the name of the record that specifies the window attributes. Because this is a window record, this keyword is automatically specified.

WDWBORDER Specifies the color, display attributes, and characters for the window’s border. The WDWBORDER keyword is also a file-level keyword.

RMVWDW Allows existing windows to be removed from the display when another window is displayed.

USRRSTDSP Allows the application to specify that the system should not save or restore the underlying display when a window is dis-played.

Note: In this display, the WINDOW keyword is a default. You can edit it, but you cannot remove it. The other keywords are not defaults. To change the parameters for any keyword, type Y in the appropriate Select parameters prompt.

2. Type Y (Yes) in the Select parameters prompts located under the Window parameters and Window borders prompts on the Select General Keywords display and press Enter. The Define Window Parameters display appears.

3. On the Define Window Parameters display, you define the position and size of the window. You can specify the parameters in two ways:

¹ Identify the record name that specifies the window attributes. This is the Referenced Window format.

¹ Identify the window as a Window Definition by specifying the window attri-butes, which are the position of the upper-left corner of the window border and the number of rows and columns within the window.

4. Press Enter on the Define Window Parameters display to accept the default values. The Define Window Border Parameters display appears.

5. Do the following on the Define Window Border Parameters display:

a. Type Y (Yes) in the Define parameters prompt under the Color prompt.

b. Type Y (Yes) in the Define parameters prompt under the Display Attributes prompt.

c. Type Y (Yes) in the Define parameters prompt under the Border Characters prompt.

d. Press Enter.

The Select Border Color display appears.

6. Type Y (Yes) next to the color that you want to specify for the window border on the Select Border Color display and press Enter.

Note: You can only choose one color.

The Select Border Display Attributes display appears.

7. Type Y (Yes) next to the display attributes that you want to specify for the window border on the Select Border Attributes display and press Enter.

The Select Border Characters display appears. On the Select Border Charac-ters display, you specify the characCharac-ters that you want to use for the parts of the window border in the CHARACTER column.

8. Press Enter to use the defaults.

The Define Window Border Parameters display reappears.

Viewing the Window on the Design Image Work Screen

To see the window you created with the Design Image work screen:

1. Press Enter on the Define Window Border Parameters display until the Work with Display Records display appears.

2. Type 12 in the Opt column for the WINDOW1 record and press Enter. The Design Image work screen, with the window, appears as follows:

‡ —

...

: :

: :

: :

: :

: :

: :

: :

: :

: :

: :

...

Work screen for record WINDOW1: Press HELP for function keys

ˆ ˜

The window is empty, because no fields were created for the display. You can now work with the display to define fields for the window.

The procedure for editing keywords and parameters for a window is the same as the procedure used for editing keywords and parameters for other records and files.

¹ To edit record-level keywords and parameters for an existing window, type 8 (Select keywords) in the Opt column on the Work with Display Records display, and press Enter.

¹ To edit file-level window border keywords and parameters, press F14 (File-level keywords) on the Work with Display Records display.

In document Sda (Page 125-129)

Related documents