Ü Window subfile design using
STRSDA
(1)STRSDA
Work with Display Records
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type options, press Enter.
1=Add 2=Edit comments 3=Copy 4=Delete
7=Rename 8=Select keywords 12=Design image
Opt Order Record Type Related Subfile Date DDS Error
1
(No records in file)
Bottom
F3=Exit F12=Cancel F14=File-level keywords
F15=File-level comments F17=Subset F24=More keys
(2)Take option-1
Design Screens
Type choices, press Enter.
Source file . . . . . . . . QRPGLESRC Name, F4 for list
Library . . . . . . . . . AMIT Name, *LIBL, *CURLIB
Member . . . . . . . . . . WIND_DSP3 Name, F4 for list
F3=Exit F4=Prompt F12=Cancel
(3)Take option-1 to ADD a record
Work with Display Records
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type options, press Enter.
1=Add 2=Edit comments 3=Copy 4=Delete
7=Rename 8=Select keywords 12=Design image
Opt Order Record Type Related Subfile Date DDS Error
1
(No records in file)
Bottom
F3=Exit F12=Cancel F14=File-level keywords
F15=File-level comments F17=Subset F24=More keys
(4) Select the
record type WDWSFL.
Add New Record
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type choices, press Enter.
New record . . . . . . . . . . . . . . . WSFL001 Name
Type . . . . . . . . . . . . . . . . . . WDWSFL RECORD, USRDFN
SFL, SFLMSG
WINDOW, WDWSFL
PULDWN, PDNSFL
MNUBAR
Subfile control record . . . . . . . . . WCTL001 Name
F3=Exit F5=Refresh F12=Cancel
(5)Select the General keyword as ‘YES’
Type choices, press Enter.
Y=Yes
General keywords . . . . . . . . Y
Select record keywords . . . . .
TEXT keyword . . . . . . . . . .
F3=Exit F4=Display Selected Keywords F12=Cancel
(6)Select the General keywords as
below:
Select General Keywords
Window record . . . . . . . . . . . . . : WCTL001
Type choices, press Enter.
Keyword Y=Yes Indicators/+
Window parameters . . . . . . . . . . . . WINDOW Y
Select parameters . . . . . . . . . . . Y >>> TO DEFINE WINDOW PARAMETER
Window borders . . . . . . . . . . . . . . WDWBORDER
Select parameters . . . . . . . . . . . Y >>> TO SET THE ATTIBUTE FOR
Remove windows . . . . . . . . . . . . . . RMVWDW WINDOW BORDER
User Restore Display . . . . . . . . . . . USRRSTDSP
F3=Exit F12=Cancel
(7)Define window parameters as below:
§ Actual line
o The actual line number is the
starting row for the top of the window.
§ Actual position
o The actual position number is
the starting column for the upper-left corner of the window.
§ Window lines
o The number of rows to display
in the window.
§ Window position
o The number of columns to
display in the window.
Define Window Parameters
Record . . . : WCTL001
Keyword . . : WINDOW
Referenced window . . . . . . . . . . . . Name
-OR-
Window definition
Default start positioning . . . . . . . Y=Yes
-OR-
Start line
Program-to-system field . . . . . . . Name
Actual line . . . . . . . . . . . . . 2 1-25
Start position
Program-to-system field . . . . . . . Name
Actual position . . . . . . . . . . . 10 1-128
Window lines . . . . . . . . . . . . . . 15 1-25
Window position . . . . . . . . . . . . 40 1-128
Message line . . . . . . . . . . . . . . Y Y=Yes
Restrict cursor to window . . . . . . . Y Y=Yes
F3=Exit F12=Cancel
(8)Define window border parameters as below:
Define Window Border Parameters
Record . . . : WCTL001
Keyword . . : WDWBORDER
Keyword number Roll
1 of 1 +/-
F4 for list
Indicators/+ . . . . . . . . . . . . . . . . . . .
Color. . . . . . . . . . . . . . . . . . . . . . . Y Y=Yes
Define parameters . . . . . . . . . . . . . . . Y Y=Yes
Display attributes . . . . . . . . . . . . . . . . Y Y=Yes
Define parameters . . . . . . . . . . . . . . . Y Y=Yes
Border Characters . . . . . . . . . . . . . . . . Y Y=Yes
Define parameters . . . . . . . . . . . . . . . Y Y=Yes
F3=Exit F12=Cancel
(9)Define window border color as
below:
Select Border Color
Record . . . : WCTL001
Keyword . . : WDWBORDER
Keyword number
1 of 1
Type choices, press Enter.
Colors: COLOR Y=Yes
Blue . . . . . . . . . . . . . . . . . . . . . . BLU
Green . . . . . . . . . . . . . . . . . . . . . GRN
Pink . . . . . . . . . . . . . . . . . . . . . . PNK
Red . . . . . . . . . . . . . . . . . . . . . . RED
Turquoise . . . . . . . . . . . . . . . . . . . TRQ
White . . . . . . . . . . . . . . . . . . . . . WHT
Yellow . . . . . . . . . . . . . . . . . . . . . YLW Y
F3=Exit F12=Cancel
(10)
Define window border attribute as below:
Select Border Display Attributes
Record . . . : WCTL001
Keyword . . : WDWBORDER
Keyword number
1 of 1
Type choices, press Enter.
Display attributes: DSPATR Y=Yes
High intensity . . . . . . . . . . . . . . . . . HI
Reverse image . . . . . . . . . . . . . . . . . RI Y
Column separators . . . . . . . . . . . . . . . CS
Blink . . . . . . . . . . . . . . . . . . . . . BL
Nondisplay . . . . . . . . . . . . . . . . . . . ND
Underline . . . . . . . . . . . . . . . . . . . UL
F3=Exit F12=Cancel
(11)
Define window border characters as below:
Select Border Characters
Record . . . : WCTL001
Keyword . . : WDWBORDER
Keyword number
1 of 1
Type choices, press Enter.
Positions CHARACTERS
Top-left-corner . . . . . . . . . . . . . . . . .
Top-border . . . . . . . . . . . . . . . . . . . .
Top-right-corner . . . . . . . . . . . . . . . . .
Left-border . . . . . . . . . . . . . . . . . . :
Right-border . . . . . . . . . . . . . . . . . . :
Bottom-left-corner . . . . . . . . . . . . . . . :
Bottom-border . . . . . . . . . . . . . . . . . .
Bottom-right-corner . . . . . . . . . . . . . . :
F3=Exit F12=Cancel
(12)
Select record keyword as below:
Select Window Keywords
Window record . . . . . . . . . . . . . : WCTL001
Type choices, press Enter.
Y=Yes
General keywords . . . . . . . .
Select record keywords . . . . . Y
General SFLCTL keywords . . . . .
Subfile display layout . . . . .
Subfile messages . . . . . . . .
TEXT keyword . . . . . . . . . .
F3=Exit F4=Display Selected Keywords F12=Cancel
(13)
Select Indicator keyword as below:
Select Record Keywords
Record . . . : WCTL001
Type choices, press Enter.
Y=Yes
General keywords . . . . . . . .
Indicator keywords . . . . . . . Y
Application help . . . . . . . .
Help keywords . . . . . . . . . .
Output keywords . . . . . . . . .
Input keywords . . . . . . . . .
Overlay keywords . . . . . . . .
Print keywords . . . . . . . . .
ALTNAME keyword . . . . . . . . .
TEXT keyword . . . . . . . . . .
F3=Exit F4=Display Selected Keywords F12=Cancel
(14)
Define Indicators as below:
Define Indicator Keywords
Record . . . : WCTL001
Type keywords and parameters, press Enter.
Conditioned keywords: CFnn CAnn CLEAR PAGEDOWN/ROLLUP PAGEUP/ROLLDOWN
HOME HELP HLPRTN
Unconditioned keywords: INDTXT VLDCMDKEY SETOF CHANGE
Keyword Indicators/+ Resp Text
CA12 12 PREVIOUS
Bottom
F3=Exit F12=Cancel
(15)
Select SFLCTL as ‘Y’ as below:
Select Window Keywords
Window record . . . . . . . . . . . . . : WCTL001
Type choices, press Enter.
Y=Yes
General keywords . . . . . . . .
Select record keywords . . . . .
General SFLCTL keywords . . . . . Y
Subfile display layout . . . . .
Subfile messages . . . . . . . .
TEXT keyword . . . . . . . . . .
F3=Exit F4=Display Selected Keywords F12=Cancel
(16)
Define all control format keywords as below:
Define General Keywords
Subfile control record . . . . . . . . . : WCTL001
Type choices, press Enter. Keyword
Related subfile record . . . . . . . SFLCTL WSFL001 Name
Subfile cursor relative record . . . SFLCSRRRN Name
Subfile mode . . . . . . . . . . . . SFLMODE Name
Y=Yes Indicators/+
Display subfile records . . . . . . SFLDSP Y 42
Display control record . . . . . . . SFLDSPCTL Y 41
Initialize subfile fields . . . . . SFLINZ
Delete subfile area . . . . . . . . SFLDLT
Clear subfile records . . . . . . . SFLCLR 40
Indicate more records . . . . . . . SFLEND 45
SFLEND parameter . . . . . . . . *MORE Y
SFLEND parameter . . . . . . . . *SCRBAR *MORE ...
Record not active . . . . . . . . . SFLRNA
More...
F3=Exit F12=Cancel
(17)
Select display layout as ‘Y’.
Select Window Keywords
Window record . . . . . . . . . . . . . : WCTL001
Type choices, press Enter.
Y=Yes
General keywords . . . . . . . .
Select record keywords . . . . .
General SFLCTL keywords . . . . .
Subfile display layout . . . . . Y
Subfile messages . . . . . . . .
TEXT keyword . . . . . . . . . .
F3=Exit F4=Display Selected Keywords F12=Cancel
(18)
Define display layout as below.
Define Display Layout
Subfile control record . . . . . . . . . : WCTL001
Type values, press Enter.
Keyword Number
Records in subfile . . . . . . . . . . SFLSIZ 9999
Program-to-system field . . . . . .
Records per display . . . . . . . . . SFLPAG 10
Spaces between records . . . . . . . . SFLLIN
F3=Exit F12=Cancel
(19)
Below are the records that we have created.
Work with Display Records
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type options, press Enter.
1=Add 2=Edit comments 3=Copy 4=Delete
7=Rename 8=Select keywords 12=Design image
Opt Order Record Type Related Subfile Date DDS Error
1
10 WSFL001 SFL 02/12/13
20 WCTL001 WINDOW WSFL001 02/12/13
Bottom
F3=Exit F12=Cancel F14=File-level keywords
F15=File-level comments F17=Subset F24=More keys
Record WSFL001 added to member WIND_DSP3.
(20) Add one
new record ‘FOOTER’.
Add New Record
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type choices, press Enter.
New record . . . . . . . . . . . . . . . W_FOOTER Name
Type . . . . . . . . . . . . . . . . . . RECORD RECORD, USRDFN
SFL, SFLMSG
WINDOW, WDWSFL
PULDWN, PDNSFL
MNUBAR
F3=Exit F5=Refresh F12=Cancel
(21)
Select General keywords as ‘Y’.
Select Window Keywords
Window record . . . . . . . . . . . . . : W_FOOTER
Type choices, press Enter.
Y=Yes
General keywords . . . . . . . . Y
Select record keywords . . . . .
TEXT keyword . . . . . . . . . .
F3=Exit F4=Display Selected Keywords F12=Cancel
(22)
Select General keywords as below.
Select General Keywords
Window record . . . . . . . . . . . . . : W_FOOTER
Type choices, press Enter.
Keyword Y=Yes Indicators/+
Window parameters . . . . . . . . . . . . WINDOW Y
Select parameters . . . . . . . . . . . Y
Window borders . . . . . . . . . . . . . . WDWBORDER
Select parameters . . . . . . . . . . .
Remove windows . . . . . . . . . . . . . . RMVWDW
User Restore Display . . . . . . . . . . . USRRSTDSP
F3=Exit F12=Cancel
(23)
Mention the referenced window as the control window
format name.
Define Window Parameters
Record . . . : W_FOOTER
Keyword . . : WINDOW
Referenced window . . . . . . . . . . . . WCTL001 Name >>>>>>>>>>
-OR-
Window definition
Default start positioning . . . . . . . Y=Yes
-OR-
Start line
Program-to-system field . . . . . . . Name
Actual line . . . . . . . . . . . . . 1-25
Start position
Program-to-system field . . . . . . . Name
Actual position . . . . . . . . . . . 1-128
Window lines . . . . . . . . . . . . . . 1-25
Window position . . . . . . . . . . . . 1-128
Message line . . . . . . . . . . . . . . Y=Yes
Restrict cursor to window . . . . . . . Y=Yes
F3=Exit F12=Cancel
(24)
Select Record keyword overlay as ‘Y’.
Select Record Keywords
Record . . . : W_FOOTER
Type choices, press Enter.
Y=Yes
General keywords . . . . . . . .
Indicator keywords . . . . . . .
Application help . . . . . . . .
Help keywords . . . . . . . . . .
Output keywords . . . . . . . . .
Input keywords . . . . . . . . .
Overlay keywords . . . . . . . . Y
Print keywords . . . . . . . . .
ALTNAME keyword . . . . . . . . .
TEXT keyword . . . . . . . . . .
F3=Exit F4=Display Selected Keywords F12=Cancel
Select Overlay Keywords
Record . . . : W_FOOTER
Type choices, press Enter.
Keyword Y=Yes Indicators/+ Roll
Overlay without erasing . . . . . . OVERLAY Y
Retain data on re-display . . . . . PUTRETAIN
Protect all input fields . . . . . . PROTECT
Activate OVRDTA and OVRATR . . . . . PUTOVR
Override Data . . . . . . . . . . . OVRDTA
Override Attribute . . . . . . . . . OVRATR
Initialize input fields . . . . . . INZINP
Reset all modified data tags . . . . MDTOFF
MDTOFF parameter . . . . . . . . . *UNPR
*ALL
Erase all input fields . . . . . . . ERASEINP
ERASEINP parameter . . . . . . . . *MDTON
*ALL
Erase all records below . . . . . . ERASE
F3=Exit F12=Cancel
(25)
Now design the footer using option-12.
Work with Display Records
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type options, press Enter.
1=Add 2=Edit comments 3=Copy 4=Delete
7=Rename 8=Select keywords 12=Design image
Opt Order Record Type Related Subfile Date DDS Error
10 WSFL001 SFL 02/12/13
20 WCTL001 WINDOW WSFL001 02/12/13
12 30 W_FOOTER WINDOW 02/12/13
Bottom
F3=Exit F12=Cancel F14=File-level keywords
F15=File-level comments F17=Subset F24=More keys
(26)
Design FOOTER as below.
F12 = PREVIOUS
Work screen for record W_FOOTER: Press Help for function keys.
Work with Display Records
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type options, press Enter.
1=Add 2=Edit comments 3=Copy 4=Delete
7=Rename 8=Select keywords 12=Design image
Opt Order Record Type Related Subfile Date DDS Error
10 WSFL001 SFL 02/12/13
12 20 WCTL001 WINDOW WSFL001 02/12/13
30 W_FOOTER WINDOW 02/12/13
Bottom
F3=Exit F12=Cancel F14=File-level keywords
F15=File-level comments F17=Subset F24=More keys
PRESS F9 TO ADD FOOTER RECORD TO DISPLY IT
WITH OTHER RECORDS ON THE SCREEN AT THE SAME TIME.
Select Additional Records for Display
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type options, press Enter.
1,2,3=Select for display as additional record
Option Record Type Status
1 WSFL001
2 W_FOOTER
3
WSFL001 SFL Selected
WCTL001 WINDOW In use
W_FOOTER WINDOW
Bottom
F3=Exit F5=Refresh F12=Cancel
Records currently selected: WSFL001 .
(27)
Now design the control window screen like this.
............................................
: :
: :
: 'ORG CODE' 'ACCOUNT NUMBER' 'CURRENCY' :
: :
: :
: :
: :
: :
: :
: :
: :
: :
: :
: :
: 'F12 = PREVIOUS' :
: :
:..........................................:
(28)
Now open subfile record to design the screen.
Work with Display Records
File . . . . . . : QRPGLESRC Member . . . . . . : WIND_DSP3
Library . . . . : AMIT Source type . . . : DSPF
Type options, press Enter.
1=Add 2=Edit comments 3=Copy 4=Delete
7=Rename 8=Select keywords 12=Design image
Opt Order Record Type Related Subfile Date DDS Error
12 10 WSFL001 SFL 02/12/13
20 WCTL001 WINDOW WSFL001 02/12/13
30 W_FOOTER WINDOW 02/12/13
Bottom
F3=Exit F12=Cancel F14=File-level keywords
F15=File-level comments F17=Subset F24=More keys
(29)
PRESS F10, to import the fields from database.
Select Database Files
Type options and names, press Enter.
1=Display database field list
2=Select all fields for input (I)
3=Select all fields for output (O)
4=Select all fields for both (B) input and output
Option Database File Library Record
1 MASTER AMIT REC1
F3=Exit F4=Prompt F12=Cancel
(30)
Select the fields in output mode using option-3.
Select Database Fields
Record . . . : REC1
Type information, press Enter.
Number of fields to roll . . . . . . . . . . . . . . . . . . 8
Name of field to search for . . . . . . . . . . . . . . . . .
Type options, press Enter.
1=Display extended field description
2=Select for input (I), 3=Select for output (O), 4=Select for both (B)
Option Field Length Type Column Heading
3 ORG 3,0 S ORG CODE
3 ACC 12 A ACC NUMBER
3 CCY 3 A CURRENCY
OPENDT 8,0 P OPEN DATE
PARTY 12 A PARTY NUM
ACCSTS 1,0 S A/C STS
ENTSTS 1,0 S ENT STS
VERSTS 1,0 S VER STS
More...
F3=Exit F12=Cancel
(31)
We find all the fields available at the bottom of
our screen. To display these selected fields on the screen, we put & and
then Serial no. of the field.
............................................
: :
: :
: ORG CODE ACCOUNT NUMBER CURRENCY :
: &1 &2 &3 :
: :
: :
: :
: :
: :
: :
: :
: :
: :
: :
: F12 = PREVIOUS :
: :
:..........................................:
1:ORG 2:ACC 3:CCY
(32)
Press ENTER and we see the subfile fields as below.
............................................
: :
: :
: ORG CODE ACCOUNT NUMBER CURRENCY :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: 666 OOOOOOOOOOOO OOO :
: :
: F12 = PREVIOUS :
: :
:..........................................:
(33) Add window title in DDS
WDWTITLE
Embeds text in the top border or bottom
border of a window
Final DDS is:
Columns . . . : 1 80 Edit AMIT/QRPGLESRC
SEU==> WIND_DSP3
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++++++++++
*************** Beginning of data *******************************************************
0003.00 A DSPSIZ(24 80 *DS3)
0004.00 A R WSFL001 SFL
0005.00 A ORG R O 3 4REFFLD(REC1/ORG AMIT/MASTER)
0006.00 A ACC R O 3 15REFFLD(REC1/ACC AMIT/MASTER)
0007.00 A CCY R O 3 34REFFLD(REC1/CCY AMIT/MASTER)
0008.00 A R WCTL001 SFLCTL(WSFL001)
0009.00 A CA12(12 'PREVIOUS')
0010.00 A 42 SFLDSP
0011.00 A 41 SFLDSPCTL
0012.00 A 40 SFLCLR
0013.00 A 45 SFLEND(*MORE)
0014.00 A SFLSIZ(9999)
0015.00 A SFLPAG(0010)
0016.00 A WINDOW(2 10 15 40)
0017.00 A WDWTITLE((*TEXT 'SAMPLE WINDOW') +
0018.00 A (*COLOR RED))
0019.00 A WDWBORDER((*COLOR YLW) (*DSPATR RI)-
0020.00 A (*CHAR ' '))
0021.00 A 2 2'ORG CODE'
0022.00 A DSPATR(HI)
0023.00 A 2 14'ACCOUNT NUMBER'
0024.00 A DSPATR(HI)
0025.00 A 2 32'CURRENCY'
0026.00 A DSPATR(HI)
0027.00 A R W_FOOTER
0029.00 A WINDOW(WCTL001)
0030.00 A OVERLAY
0031.00 A 14 2'F12 = PREVIOUS'
****************** End of data ************************************************************
Columns . . . : 6 80 Browse AMIT/QRPGLESRC
SEU==> WIND_PGM3
FMT H HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*************** Beginning of data ****************************************************
0001.00 HOPTION(*NODEBUGIO)
0002.00 FMASTER IF E K DISK
0003.00 FWIND_DSP3 CF E WORKSTN
0004.00 F SFILE(WSFL001:RRN)
0005.00 C DOW *IN12=*OFF
0006.00 C EXSR CLRSFL
0007.00 C EXSR LOADSFL
0008.00 C EXSR DSPSFL
0009.00 C ENDDO
0010.00 C SETON LR
0011.00 *
0012.00 C *INZSR BEGSR
0013.00 C Z-ADD *ZEROS RRN 4 0
0014.00 C SETOFF 404142
0015.00 C SETOFF 45
0016.00 C ENDSR
0017.00 C CLRSFL BEGSR
0018.00 C SETON 40
0019.00 C WRITE WCTL001
0020.00 C SETOFF 40
0021.00 C ENDSR
0022.00 C LOADSFL BEGSR
0023.00 C EVAL RRN=0
0024.00 C *LOVAL SETLL REC1
0025.00 C READ MASTER
0026.00 C DOW NOT %EOF(MASTER)
0027.00 C EVAL RRN=RRN+1
0028.00 C WRITE WSFL001
0029.00 C READ MASTER
0030.00 C IF %EOF(MASTER)
0031.00 C EVAL *IN45=%EOF(MASTER)
0032.00 C LEAVE
0033.00 C ENDIF
0034.00 C ENDDO
0035.00 C ENDSR
0036.00 C DSPSFL BEGSR
0037.00 C SETON 4142
0038.00 C EXFMT WCTL001
0039.00 C SETOFF 414245
0040.00 C ENDSR
****************** End of data *******************************************************
OUTPUT
.............. SAMPLE WINDOW .............
: :
: :
: ORG CODE ACCOUNT NUMBER CURRENCY :
: 191 A00000000002 USD :
: 191 A00000000004 EUR :
: 191 A00000000005 USD :
: 191 A00000000007 EUR :
: 191 A00000000008 USD :
: 192 A00000000001 EUR :
: 192 A00000000006 USD :
: 192 A00000000009 TRY :
: :
: :
: :
: F12 = PREVIOUS :
: :
:..........................................: