The display is defined by the DDS in this example. It is displayed
by output operations to the record formats PROMPT and RESPONSE.
CUSTOMER FILE ADD/UPDATE
Enter new or existing customer number
Enter A to ADD new Customer
Name XXXXXXXXXXXXXXXXXXXXXXX
Address XXXXXXXXXXXXXXXXXXXXXXX
City XXXXXXXXXXXXXXXXXXXXXXX
State XX Zip code NNNNN
Credit limit $NNN,NNN.NN
F3 - End Program & Print Report F6 - Return to prompt
- Name XXXXXXXXXXXXXXXXXXXXXXX
- If the cursor is positioned in the area with Xs on the NAME field and
the Help key is pressed, online help information will appear.
The following keywords are important in the example:
CAnn
CHECK
DSPATR(HI BL)
DSPATR(UL)
EDTCDE(Y)
EDTCDE(2 $)
ERRMSG
|
HELP
HLPARA
HLPRCD
HLPBDY
HLPDOC
OVERLAY
PRINT
|
The example uses +n to specify position.
Figure 1. Display with two record formats|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A (1) PRINT
00020A CAO3(21 'End & Print')
00030A CAO6(22 'Display PROMPT')
00040A (7) HELP
00050A (8) HLPDOC(START GENERAL HELP)
00060A (2) R PROMPT
00070A H (9) HLPDOC(LBL1 HELP#1 HELP)
00080A (9) HLPARA(2 2 2 50)
00090A 1 30'CUSTOMER FILE ADD/UPDATE'
00100A 3 2'Enter new or existing customer +
00110A number'
00120A (3) ACTNUM 5 0B +1CHECK(MF)
00130A 40 (4) ERRMSG('Customer number not +
00140A (4) found' 40)
00150A 4 2'Enter A to ADD new Customer'
00160A ADD 1 I +1
00170A (5) R RESPONSE (6) OVERLAY
00180A H (10) HLPRCD(NAMEHELP)
00190A HLPARA(6 10 6 28)
00200A H (11) HLPRCD(ADDRHELP)
00210A HLPARA(7 10 9 33)
00220A (12) HLPBDY
00230A H HLPRCD(HELPRCD1 HELPFILE)
00240A (13) HLPARA(12 18 12 40)
A
A
A
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00250A*
00260A 6 2'Name' (14)
00270A NAME 18 B 6 10 (14)
00280A 7 2'Address' (14)
00290A ADDR 18 B 7 10 (14)
00300A 8 2'City' (14)
00310A CITY 18 B 8 10 (14)
00320A 9 2'State' (14)
00330A STATE 2 B 9 10 (14)
00340A 9 19'Zip code' (14)
00350A ZIP 5Y 0B +1 (14)
00360A 12 2'Credit Limit'
00370A (15) CRDLMT 8Y 2B 12 21EDTCDE(2 $) DSPATR(HI)(16)
00380A (17) 23 2'F3 - End Program & Print Report +
00390A F6 - Return to prompt'
00400A*
00410A* HELP RECORDS
00420A*
00430A R NAMEHELP
00440A 2 2'HELP TEXT FOR NAME FIELD'
00450A 4 2'ENTER THE CUSTOMER NAME'
00460A R ADDRHELP
00470A 4 2'HELP FOR ADDRESS,CITY,STATE,ZIP'
00480A 6 2'ENTER ADDRESS,CITY,STATE & ZIP'
A
A
A
Legend:
- (1)
- The PRINT keyword allows the display station user to print the display
at any time by pressing the Print key.
- (2)
- An application program displays a prompt by issuing
an output operation to the record PROMPT, displaying the constant fields 'CUSTOMER
FILE ADD/UPDATE', 'ENTER EXISTING CUSTOMER NUMBER', 'ENTER A TO ADD NEW CUSTOMER',
and the named fields ACTNUM and ADD.
- (3)
- The CHECK(MF) keyword specifies that when the user types into one position
of the field ACTNUM, he must type into all five positions before pressing
the Enter key, or an error message is displayed and the keyboard is locked.
The user must press the Reset key and reenter through the input field.
- (4)
- If record format PROMPT is displayed and your program sets on indicator
40 when an output operation is sent to record format PROMPT, the error message
'Customer number not found' is displayed on the message line (line 24 of the
24-line display unless the MSGLOC keyword is specified). The message is highlighted,
field ACTNUM is displayed with its image reversed, and the keyboard is locked
until the user presses the Reset key.
- (5)
- After the user presses the Enter key, the application
program retrieves the required information from the database and sends an
output operation to record format RESPONSE, displaying the fields described
in the next paragraphs.
- (6)
- The OVERLAY keyword specifies that an output operation
to this record format (RESPONSE) does not cause the entire display to be cleared,
as it is by default.
- (7)
- The HELP keyword enables the Help key for this display.
- (8)
- The HLPDOC keyword specified at the file level identifies the document
to be displayed when no help area for the active records contains the current
cursor location.
- (9)
- The HLPDOC and HLPARA keywords on this H specification specify that the
HELP#1 document in the HELP folder will be displayed starting at the LBL1
help label if the Help key is pressed while the cursor is in positions 2 through
50 of line 2.
- (10)
- The HLPRCD and HLPARA keywords on this H specification cause the record
NAMEHELP to be displayed if the Help key is pressed while the cursor is in
positions 10 through 28 of line 6. The record NAMEHELP is defined in this
display file; therefore, a file name does not have to be specified on the
HLPRCD keyword.
Note: When using application help keywords, the screen is
automatically cleared.
- (11)
- The HLPRCD and HLPARA keywords on this H specification
cause the ADDRHELP record to be displayed if the Help key is pressed while
the cursor is in positions 10 through 28 of line 7, 8, or 9.
- (12)
- The HLPBDY keyword limits the help records displayed when the Page key
is pressed. If either NAMEHELP or ADDRHELP is displayed when the Help key
is pressed, the NAMEHELP and ADDRHELP records are accessible using the Page
key. If HELPRCD1 is displayed when the Help key is pressed, the help records
from other H specifications are not accessible using the Page key.
- (13)
- The HLPRCD and HLPARA keywords on this H specification cause the record
HELPRCD1 in the file HELPFILE to be displayed if the Help key is pressed while
the cursor is in positions 18 through 40 of lines 12 through 40. This record
is in a separate display file called HELPFILE.
- (14)
- Five constant fields ('Name', 'Address', 'City', 'State', and 'Zip Code')
and five named fields (NAME, ADDRES, CITY, STATE, ZIP) are grouped together
on the display by the line/position specifications. NAME, ADDRES, CITY, and
STATE default to character-type fields (A in position 35) because no decimal
positions are specified. ZIP is a numeric-only, integer field (Y in position
35; 0 in position 37), so its display length equals its specified length.
- (15)
- The field CRDLMT is specified with EDTCDE (2 $).
EDTCDE(2) is used for monetary amounts, and the $ specifies the floating
currency symbol.
- (16)
- The DSPATR(H1) keyword highlights the field CRDLMT.
- (17)
- Instructions to the workstation user are generally
located at the bottom of the display, just above the message line.