Design page

The Design page shows the DDS source as it would appear on either a screen (for display files) or a printed page (for printer files). It allows you to design your application's screens or reports by laying out records and fields in a graphical user interface.

On the Design page, you can easily create, edit, resize, and move DDS objects graphically. Create new records, fields, and constants directly on the Design page by using the palette pushbuttons to the left of the Design area or from the pop-up menus. The toolbar above the Design area allows quick access to many of the editing features as well as information about the currently selected object.

To access the Design page, click on a group name tab in the Workbook or right-click on a group or record in the DDS Tree. The Design page comprises of the following areas:

For more information on the actions you can perform, click on the entries below.

Design area

The design area of the Design page represents the visual appearance of the screen or report you are creating. It graphically displays the DDS objects for a group of records. In the Design area, you can perform the following operations:

Selecting objects:

Positioning objects:

Sizing objects:

Copying and pasting objects:

The Toolbar

The toolbar provides quick access to commonly performed actions. When you place the cursor over one of the toolbar's graphic buttons, tooltip help appears next to the image. This help is a short description of the action.

The toolbar also shows the properties for the current anchor object on the Design area. The anchor object is the object that was selected last.

The following is a list of the available push buttons on the toolbar.

Displays the Group properties for this group.
Displays the Record properties for this record. A drop-down list next to displays the name of the current record.
Renames the field or record using the combo box if the button is latched. When the button is unlatched, this field is searchable.

To search for a DDS object, simply type the first character of the DDS object's name in the combo box. The first matched name will be selected in the combo box and the object will be the anchor object in the Design page.

Makes the next record in the group active.
Makes the previous record in the group active.
Displays the Named indicator sets dialog where you can define which indicators are on or off. A drop-down list box next to displays the named indicator set that the Design page is currently using.

A drop-down list box displays the name of the anchor object. You can change the name of the selected field in this list box.

Note:
Help specifications cannot be renamed using this function.
Specifies this field as a character output field.
Specifies this field as a zoned decimal field.
Specifies this field as a floating-point field.
Specifies this field as a DBCS field.

The drop-down list box next to the field type buttons shows the keyboard shifts specified for the field.

Numeric spin buttons show the length and decimal positions of a field or constant. For windows or help specifications in display files, these spin buttons show the width and height.

Display file attributes:

Specifies the field usage specification as input.
Specifies the field usage specification as output.
Specifies the field usage specification as both input and output.

A color button shows the current color of the anchor object. To change the color of a selected object, select another color from the palette.

Note:
If multiple objects are selected, the color will change for all selected objects.
Converts the selected text constant to a named field with the appropriate length, usage, data type and editing keywords to match the original text constant.

For example, $999,999.99 will create an input/output numeric field of length 8 with 2 decimal places and the appropriate edit code to give it a currency symbol and comma delimeters. If the text constant is the SDA syntax for creating fields, the desired field will be created. For example, +3(7,2) will create an input capable field of length 7 with 2 decimal places.

Display file attributes:

Causes the text to blink.
Displays column separators between each character.
Displays fields at high intensity.
Hides the field.
Reverses the foreground and background colors for the selected fields.
Underlines the field.

Printer file attributes:

Makes the text in the field bold.
Underlines the field.

Inserts a new line above the current cursor position.
Deletes the line the current cursor is on.
Aligns the left side of the selected objects to the left side of the anchor object.
Aligns the center of the selected objects to the center of the anchor object.
Aligns the right side of the selected objects to the right side of the anchor objects.
Aligns the top of the selected object to the top of the anchor item.
Centers the selected objects within the design area.
Evenly spaces all objects on the current line horizontally within the design area.

The Palette (Display files)

The palette is a menu of push buttons which allow you to create records, fields, and constants on the design area. When you place the cursor over one of these images, tooltip help appears next to the image. This help is a short description of the action.

The following is a list of the available push buttons on the palette.

A checkbox toggles the mouse pointer to 'sticky' mode. You can add multiple instances of the DDS object without reselecting its push button.

Creates a new standard record on the Design page.
Creates a subfile record in the Design page.
Note:
When the subfile or subfile control record is active, numeric spin buttons appear on the palette. You can edit the SFLPAG, SFLSIZ, and SFLLIN keyword parameters by using these spin buttons.
Creates a named field that your program can read and update at run time.
Creates a continued field which can wrap the applications user's input into several rows in a rectangular area on the design area.
Creates a date field which allows you to store date information.
Creates a time field which allows you to store time information.
Creates a timestamp field which allows you to store timestamp information.
Creates a database reference field which has the same attributes as a field in a database file.
Creates a database reference field by selection which allows you to select multiple database fields from the AS/400 at the same time.
Creates a source reference field which inherits the characteristics of another field within the same DDS source file.
Creates a text constant which displays a specified text string.
Creates a message constant field which displays a message from a message file.
Creates a constant field which contains the job date.
Creates a time constant to display the current system time as a constant (output-only) field.
Creates a user constant which displays the user profile name for the current job as a constant (output-only) field.
Creates a system constant which contains your application user's AS/400 system name.
Creates a help specification to provide cursor-sensitive help for an area of the display by associating the area with text that is stored elsewhere.

The Palette (Printer files)

The palette is a menu of push buttons which allow you to create records, fields, and constants on the design area. When you place the cursor over one of these images, tooltip help appears next to the image. This help is a short description of the action.

The following is a list of the available push buttons on the palette.

A checkbox toggles the mouse pointer to 'sticky' mode. You can add multiple instances of the DDS object without reselecting its push button.

Creates a relative record on the Design page.
Creates an absolute record in the Design page.
Creates a named field to the currently active record that can be read and updated by your program at run time.
Creates a date field which allows you to store date information.
Creates a time field which allows you to store time information.
Creates a timestamp field which allows you to store timestamp information.
Creates a database reference field which has the same attributes as a field in a database file.
Creates a database reference field by selection which allows you to select multiple database fields from the AS/400 at the same time.
Creates a source reference field which inherits the characteristics of another field within the same DDS source file.
Creates a text constant which supplies a text description (or comment) for the record format or field that is used for program documentation.
Creates a message constant field which contains text for constant fields in a message description.
Creates a constant field which contains the job date (or optionally the system date).
Creates a time constant to display the current system time as a constant (output-only) field.
Creates a page constant which displays a page number on your report.

At the bottom of the palette is a numeric spin button. Use this field to change the number of sample records in this file.

Ruler

The Design page contains a ruler which allows you to align the layout of fields and records. For display files, the page contains a horizontal and vertical ruler. For printer files, the page contains a horizontal ruler.

Status line

At the bottom of the CODE Designer window is the status line. This information area displays any error messages occurring in your file or record.

Use the status line to quickly view the edit mode you are in. The edit mode specifies if the design area replaces or inserts characters into existing text fields. Press the Insert key to toggle between replace and insert mode. You can also view the current row and column position of the cursor. For PRTF files, you can also view the page number which is in the format ::,.