Screen Design Aid(SDA):
This is a development tool is to aid in the creation of user interfaces on the AS/400.This tool allows a programmer to "paint" screens and menus used by a program from within a simple editor, defining input and output fields and special text attributes. These screens may then be called from an application program, allowing the program to have all the features of the AS/400 user interface without direct programming of the appearance of the interface.
SDA can be invoked by either selecting option ‘9’ from Programmer’s menu or through typing the command ‘STRSDA’ from AS/400 command entry line.
AS/400 Screen Design Aid (SDA)
Select one of the following:
1. Design screens 2. Design menus 3. Test display files
Selection or command ===>
F1=Help F3=Exit F4=Prompt F9=Retrieve F12=Cancel (C) COPYRIGHT IBM CORP. 1981, 2000.
Screen Designing:
The following function keys can be used while designing your image:
F3=Exit
Terminates screen design session.The Exit Design Image work screen displays appears where there is a choice to save the work , and return to the Work with Display records menu.
F4=Prompt
Shows Work with Fields display.
F6=Condition
Shows the Condition Work Screen display.
F9=Select additional records
Selects additional records to display on the Design image work screen.
F10=Database
Shows the display for selecting Database Files display.
F11=Non-display selected fields
Toggle between two fields lists that are displayed on the bottom row of the work screen.
F12=Cancel
Save the current work and return to the Work with Display records display.
(Note:Anything that have been typed since last pressed enter is not processed.)
F14=Ruler
Place a vertical and horizontal ruler on the Design Image work screen to position the cursor.The ruler does not interfere with the data.Press F14 to remove the ruler .Defining fields on the ruler may cause results that cannot be predicted.
F15=Subfile Prompt.
This function will work only when a subfile exists.Press F15 display prompt on the bottome row of the Design Image work screen that allows changing the subfile line(SFLLIN) and subfile page(SFLPAG) sizes that were in effect for the current record being defined.
F17=Print
Print the current contents of the Design Image work screen.
F18=Tab
Moves the cursor to the attribute position of the next field.
F19=Back Tab
Moves the cursor to the attribute position of the previous field.
F20=Reverse Image Constants
Switch the reverse imaging of constants on and off.This reverse imaging is temporary and does
Use F20 to determine the starting and ending points of the constants. Constants which have the underline attribute (but not the reverse image and highlight attributes) will not be displayed in reverse image. Constants that are not currently displayed will be highlighted and will appear in reverse image.
F21=Display additional records.
Displays the additional records with the primary record. Press F21 again to display only the primary record. Use this function key to determine which fields on the display belong to the primary record. Only the fields of the primary record can be changed.
Adding fields.
To add a user defined field, type + followed by I (input), O(output), or B(both) for alphabetic fields, or followed by 3(input), 6(output), or 9(both) for numeric fields and press Enter. To add a floating point field, add a numeric field followed by E (single-precision) or D(double-precision) and press Enter. Indicate the length of a field by the number of characters following +, or by the length specified in brackets after the first characters.
Adding constants
To add a new constant or change an existing constant
1. Type a constant. A blank character ends the constant.
2. Type constants with single quotation marks to define separate constants for each character string(word) that is followed by a blank.
3. Surround a character string with single quotation marks to define single constant.
4. Surround several constants with single quotation marks to redefine them as one constant.
5. Use a double quotation mark to end one constant and start a new constant while taking up only one position.
Adding fields from a database file
The fields selected from the database file appear on the bottom row of the Design
Image work screen. Move fields from the bottom line to your display by typing &
followed by the field number, in multiple mode, and the column heading position and pressing Enter. he fields begin in the position where you type &.
Moving, Copying and Shifting fields
Reposition fields on the screen by using their attribute position.
(Note: The attribute position is the space directly in front of the field. Press F19 to go to the attribute position of the previous field. Press F18 to go to the attribute position of the next field.) Choose from the from the following methods and press Enter.
Centering a field
Type AC in the attribute position of the field to move the field to the center of the same row.
Moving a field - , =
Type – in the attribute position of the field and type = where you want the field to appear.
Copying a field - , ==
Type – in the attribute position of the field and type == where you want a copy of the field to appear.
Moving a block of fields -, -, =
Type – in the upper left corner of the block of fields. Type – in the lower right corner of the block of fields so the – is one character beyond the longest field in the block. Type = where you want the group of fields to appear.
Copying a block of fields -, - ,==
Type – in the upper left corner of the block of fields. Type – in the lower right corner of the block of fields so the – is one character beyond the longest field in the block. Type == where you want the group of fields to appear.
Shifting a field <<<, >>>
Type <<< in the position preceding the field (attribute position of the fields), or type >>> after the field (over the ending attribute byte), to shift the field left or right as far as the signs extend.
You may type any number of > or <, and you can shift more than one field at a time in the work screen.
Date and Time keywords.
Type *DATE or *TIME to define special constants on the display where the current session date and system time will be automatically substituted.
Type *USER or *SYSNAME to define special constants on the display where the user name and the system name will be automatically substituted.
Display Files:
The following types of record formats can be defined in display files:
Single Record Formats are normal record formats with a fixed number of variables and literals defined in them
Subfile Record Formats are record formats that define a particular format but which allows the processing of multiple records of the same definition.
Subfile Control Record Formats are record formats that control the processing of a related Subfile record format.
Display File Keywords
There are over 130 keywords associated with display files. These keywords are used to provide additional qualification to the display file at various levels. Display file keywords my be divided into the following groups.
File Level keywords, they are used at the file levels and are common to all the record formats in that file.
Record Level keywords, they are used at a particular record level and applicable to all the constants and fields in the given record format.
Field Level keywords apply to a particular field in a record format.
Some of the more commonly used keywords are detailed below:
File Level Keywords
ALTHELP Alternate Help Key
Used to assign an alternate command key as the help key.
ALTPAGEDOWN Alternate Page Down Key
Used to assign an alternate command key as the page down key
ALTPAGEUP Alternate Page Up Key Used to assign an alternate command key as the page up key
ALWGPH Allow Graphics
Used to specify that graphic characters could be generated and displayed in the named display file. This keyword however is valid only for workstations that support graphic displays such as the IBM 5292.
CAnn Common Attention Keys
Used to assign the usage of indicators to be associated with command keys.
CFnn Common Function Keys
Used to assign the usage of indicators to be associated with command function keys.
Command Function Keys differ from command attention keys in that the data is transferred between screens only with the usage of command attention keys.
CHGINPFDT Change input default
Defined at the file level so that the field level defaults can be overridden with the user specified attributes.
DSPSIZ Display size
Used to assign the display size of the work station display.
HELP Help key
Used to assign an indicator for the Help key so that the program may recognize its usage.
HOME Home key
Used to assign an indicator for the Home key so that the program may recognize its usage.
MSGLOC Message Location
Used to identify a line of display where the messages may be displayed.
PRINT Print key
Used to enable the facility of taking the screen prints and to identify a printer file name into which any screen prints are to be directed
REF Referenced File
Used to identify a file from which all the field references are to be derived from.
ROLLUP Rollup Key
Used to specify an indicator that is to be associated with the Rollup key. This indicator can then be used to trigger program action for the Rollup function.
Used to specify an indicator that is to be associated with the Rolldown key. This indicator can then be used to trigger program action for the Rolldown function.
Record Level Keywords
ALARM Alarm
Used to specify that the work station alarm is to be sounded when the named record format is output
ALWGPH Allow Graphics
Used to specify that graphic characters could be generated and displayed in the named display file. This keyword however is valid only for workstations that support graphic displays such as the IBM 5292.
ASSUME Assume
Used to indicate that named record format is to be assumed to be displayed by the previous program, used in association with the KEEP keyword in the calling program this
Keyword overlay the named record format over the previous display
BLINK Blink
Used to indicate that named record format is to blink when displayed.
CHANGE Change
Used to specify an indicator which is to be set one when any of the input fields in the named record format is modified by the work station user.
CHGINPDFT Change input default
Defined at the record level so that field level defaults can be overridden with the user specified attributes.
CSRLOC Cursor Location
Used to position the cursor in a specified row-column position when the screen is displayed.
ERASE Erase
This keyword is used to erase a record in a specified row-column position when the screen is displayed.
ERASEINP Erase Input
Used to erase input fields from the named record format before the next output operation on the display file.
ERRMSG Error Message
Used to specify the text to be displayed as an error message upon occurrence of an error condition.
ERRMSGID Error Message Id
Used to identify a message identity from a named message file to be displayed as a error Message upon the occurrence of an error condition
HLPCMDKEY Help Command Key
Used to specify an indicator to be associated with the Help Key for the named record format.
HOME Home Key
Used to assign an indicator for the Home key so that the program may recognize its usage.
KEEP Keep Display
Used to retain the display of the named record format even after the termination of the program so that the next program in the invocation stack may still be able to display the screen. This keyword to be used in the display file of the calling program in association with ASSUME keyword to be used in the display file of the called program.
OVERLAY Overlay
Used to retain the display of the format already displayed when the named record format is to be displayed.
PRINT Print Key
Used to identify a printer file name into which any screen prints are to be directed
PROTECT Protect
Used to identify that all the input capable fields in the named format are to be input inhibited.
PUTOVER Put over
Used to indicate that when used in association with OVRDTA or OVRATR keywords at the field level, only those screen data that have been changed in an input operation need be referred when the record format is output again.
Field Level Keywords
ALIAS Alias
Used to assign an alias name to a field.
CHANGE Change
Used to specify an indicator which is to be set on when any of the input fields in the named
CHGINPDF Change input default
Defined at the field level so that field defaults can be overridden with the user specified attributes.
CHECK Check
Used to specify a set of validation rules such as
ME Mandatory Entry
MF Mandatory Fill
RB Right justified with blanks
RZ Right justified with zeros
CMP, COMP Compare
Used to specify a literal value against which any input value to the field is validated on an input operation
COLOR Color
Used to assign a color to a field or constant when it is displayed. Attribute values are
GRN Green
WHT White
RED Red
TRQ Turquoise
YLW Yellows
PNK Pink
BLU Blue
DATE Date
Used to specify that the system date is to be displayed in the specified position
DFT, DFTVAL Default value
Used to assign a default value to a field to be displayed during an output operation
DLTCHK Delete validity checking
Used to specify that any validity checking specified in the definition of the referenced field is to be ignored for the named field
DLTEDT Delete Editing
Used to specify that any editing rules specified in the definition of the referenced field is to be ignored for the named field.
DSPATR Display attribute
Used to nominate a display attribute to be attached to the named field during an output operation.
Valid values are
BL Blink
CS Column separators
HI High-light
ND Non – display
PC Position Cursor
PR Protect
RI Reverse Image
UL Underline
EDTCDE Edit code
Used to specify an editing rule for numeric variables. Edit codes govern such parameters as zero balances, suppression of the leading zeros, commas, negative sign and credit balance. Edit coded can also be used to separate dates, month and year components of dates.
EDTWRD Edit word
Used to specify the user defined editing rules for both alphabetic and numeric fields.
OVRATR Override attributes
Used in association with the PUTOVR keyword at the record level to indicate that only if the attributes of the named variable or literal has changed should data be sent to the screen in the next output operation.
RANGE Range
Used to specify a range of values that are valid input values for the named variable
REFFLD Referenced field name
Used to specify the name of a previously defined field from the file indicated as the referenced file at the file level.
SYSNAME System name
Used to indicate that the system name is to be displayed in the specific row-column position at the next output operation
TEXT Text
Used to attach descriptive text for the named variable to be used when viewing or printing the display file field definitions.
TIME Time
Used to indicate that the system is to be displayed in the specific row-column position upon the next operation to the screen
USER User name
Used to indicate that the work station user name is to be displayed in the specific row-column position upon the next output operation to the screen.
VALUES Valid values
Used to specify a set of valid values that can be allowed as input into the named variable during an output operation.