Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Objectives
Create a menu
2
Why screens?
PARM statement
No DCLs needed to define program
variables to hold the passed data
3
Type = *FILE
Att = DSPF
Source Physical
File
Machine Language
Screen definition
User
SDA
DDS Screen
Definition
Type = DSPF
Starting SDA
STRSDA
SDA Menu
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
DDSSRC
YOURLIBXX
Member . . . . . . :
Source type . . . :
Order
Record
___________
Type
3=Copy
12=Design image
Related Subfile
Date
EXAMPLE
DSPF
4=Delete
Ed
i
t/C
DDS Error
ha
n
ge
Bottom
F3=Exit
F15=File-level comments
F12=Cancel
F17=Subset
F14=File-level keywords
F24=More keys
Add a Record
Add New Record
File . . . . . . :
Library . . . . :
DDSSRC
YOURLIBXX
Member . . . . . . :
Source type . . . :
EXAMPLE
DSPF
F3=Exit
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
F5=Refresh
F12=Cancel
RECEX
Name
RECORD
RECORD,
SFL,
WINDOW,
PULDWN,
MNUBAR
USRDFN
SFLMSG
WDWSFL
PDNSFL
Work screen for record RECEX: Press Help for function keys.
10
Defining a Screen
text fields
variable fields
fields
11
12
13
14
Database Fields
e.g. &1L
15
Database File
CARTON____
__________
__________
__________
Library
YOURLIBXX_
__________
__________
__________
F3=Exit
F4=Prompt
F12=Cancel
Record
CRTFMT____
__________
__________
__________
16
Select Fields
Select Database Fields
Record . . . :
CRTFMT
__8
___________
Field
CRTNUM
AMOUNT
STORE
BCHNUM
Length
8
12
7
4
Type
A
A
A
A
Column Heading
CARTON NUMBER
CARTON SIZE
STORE CODE
BATCH NUMBER
Bottom
F3=Exit
F12=Cancel
17
18
&2R
&3C
&4P
20
BBBBBBBB
IIIIIIIIIIII
CARTON SIZE
STORE
CODE
OOOOOOO
BATCH NUMBER
1:BCHNUM
21
+I(4)
+O(5)
+B(6)
+3(4)
+6(5)
22
+9(6)
SDA Ruler
1
2
3
4
5
6
7
8
9
10
11
12
13
... ... 1 ... ... 2 ... ... 3 ... ... 4 ... ... 5 ... ... 6 ... ... 7 ... ... 8
15
16
17
18
19
20
21
22
23
24
23
Invoke
Display attributes
Colors
Keying options
Validity check
Input keywords
General keywords
Editing keywords
Database reference
Error messages and Message ID
26
CRTNUM
8
Usage . . :
Row . . . :
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Y=Yes
_
_
_
_
_
_
_
_
_
TEXT keyword
CARTON NUMBER
F3=Exit
Column . . . :
Database reference . . . . . . .
Error messages . . . . . . . . .
Message ID (MSGID) . . . . . . .
. . . . . . . . . .
B
7
F12=Cancel
27
18
CRTNUM
8
Usage . . :
Row . . . :
B
7
Column . . . :
F3=Exit
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
COLOR
BLU
GRN
PNK
RED
TRQ
WHT
YLW
Order
(1-7)
_
_
_
_
_
_
_
Indicators/+
___
___
___
___
___
___
___
___
___
___
___
___
___
___
F12=Cancel
28
___
___
___
___
___
___
___
18
Delete fields
D
or <<<
Record . . . :
RECEX
Order
10
20
30
40
50
60
_____
_____
_____
Field
CARTON NUM
CRTNUM
CARTON SIZ
AMOUNT
STORE
CODE
Type Use
C
A
B
C
A
I
C
C
__________
__________
__________
F6=Sort by row/column
H
M
P
Length
14
8
11
12
5
4
______
______
______
F12=Cancel
Row/Col
07 002
07 018
11 032
11 018
14 018
15 018
Ref Condition
Overlap
Y
Y
Hidden
Message
Program-to-system
30
More...
Selection
1
F12=Cancel
31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Y
Y=Yes
DDSSRC
F4 for list
YOURLIBXX
Name, *LIBL ...
EXAMPLE
F4 for list
____________________________
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Y
_
EXAMPLE
YOURLIBXX
_
Y=Yes
Y=Yes
F4 for list
Name, *CURLIB
Y=Yes
Y=Yes
Specify additional
save or create options . . . . . . . .
Y=Yes
F3=Exit
.
.
.
.
.
F4=Prompt
.
.
.
.
.
.
.
.
.
.
F12=Cancel
32
33
Rather than:
Exiting
SDA
Editing the DDS
Saving the changes
35
Source Physical
File
Type = *FILE
Att = DSPF
Type = *PGM
Att = CLP
Screen Definition
Type = CLP
Program Source
Code
COMPILE
36
Function Keys
38
Function Keys
Member . . . :
EXAMPLE
Bottom
F3=Exit
F12=Cancel
40
Function Key
0001.00
0002.00
0003.00
0004.00
***************
PGM
DCLF
SNDRCV
IF
41
Testing Screens
42
RECEX
Value
98765432:______________________________________________________
1234567:_______________________________________________________
Tester enters value(s)
Bottom
F3=Exit
F12=Cancel
43
98765432
BATCH NUMBER
44
98765432
55 GAL DRUM
STORE
CODE
1234567
BATCH NUMBER
45
RECEX
Value
98765432:
55 GAL DRUM :
SDA displays
input values
F12=Cancel
46
Creating Menus
47
Creating Menus
MENUEX
MENUEX Menu
Selection or command
F3=Exit
F13=Command area
F12=Cancel
F24=More keys
48
Creating Menus
Define Menu Commands
Menu . . . . . . :
MENUEX
__
F12=Cancel
More...
F24=More keys
49
Creating Menus
Library
Type = *MSGF
Type = *FILE
Att = DSPF
User
SDA
Att=MNUCMD
Att=MNUDDS
50
Points to Remember
51