Troubleshooting
Problem
When both display sizes are specified with the DSPSIZ(*DS4 *DS3), the DDS compiler checks to make sure that all subfile and subfile control records will work on both display sizes (even if you are planning on displaying it only on 27 X 132). There is no way to specify that you want it to work only on 27 x 132.
Resolving The Problem
Caution: This is an example only. IBM accepts no responsibility for its correctness. |
Note: The information in this document describes how the WSFM (Work Station Functional Manager) is designed. There are no plans to change how a 5250 data stream handles the different display sizes. The information in this document can also be found in APAR SA60651.
When both display sizes are specified with the DSPSIZ(*DS4 *DS3), the DDS compiler checks to make sure that all subfile and subfile control records will work on both display sizes (even if you are planning on displaying it only on 27 X 132). There is no way to specify that you want it to work only on 27 x 132. This is explained in the Application Display Programming manual, SC41-5712-01, in the chapter, Defining Your Display in a Display File, in subparagraph Specifying Valid Screen Sizes. It states that if you have the DSPSIZ keyword with a Primary and a Secondary display size, all of the display file is validated for both display sizes. This means that the compiler is going to try to test the fields you defined against both display sizes.
The following example gets compile messages CPD7817 and CPD7812:
SEQNBR *...+....1....+....2....+....3....+....4....+....5....+....6....+....
400 A DSPSIZ(*DS4 *DS3)
500 A PRINT(*LIBL/QSYSPRT)
600 A CF03(03 'EXIT')
700 A CF12(12 'EXIT')
800 A INDARA
900 A*
1000 A R OPTSF1VS SFL
1100 A W1ITEM 25A O 5 2
1200 A W1Q10 4D B 5 31
1300 A W1Q11 4D B 5 39
1400 A W1Q12 4D B 5 47
1500 A W1Q01 4D B 5 55
1600 A W1Q02 4D B 5 63
1700 A W1Q03 4D B 5 71
1800 A W1Q04 4D B 5 79
1900 A W1Q05 4D B 5 87
2000 A W1Q06 4D B 5 95
2100 A W1Q07 4D B 5103
2200 A W1Q08 4D B 5111
2300 A W1Q09 4D B 5119
2400 A W1QTOT 5D O 5127
2500 A W1DESC 20A O 6 5
2600 A W1D10 7D O 6 28
2700 A COLOR(BLU)
2800 A W1D11 7D O 6 36
2900 A COLOR(BLU)
3000 A W1D12 7D O 6 44
3100 A COLOR(BLU)
3200 A W1D01 7D O 6 52
3300 A COLOR(BLU)
3400 A W1D02 7D O 6 60 3500 A COLOR(BLU)
3600 A W1D03 7D O 6 68
3700 A COLOR(BLU)
3800 A W1D04 7D O 6 76
3900 A COLOR(BLU)
4000 A W1D05 7D O 6 84
4100 A COLOR(BLU)
5722SS1 V5R2M0 020719 Data Description XZY133
Data Description Source
SEQNBR *...+....1....+....2....+....3....+....4....+....5....+....6....+....
4200 A W1D06 7D O 6 92
4300 A COLOR(BLU)
4400 A W1D07 7D O 6100
4500 A COLOR(BLU)
4600 A W1D08 7D O 6108
4700 A COLOR(BLU)
4800 A W1D09 7D O 6116
4900 A COLOR(BLU)
5000 A W1DTOT 8D O 6124
5100 A COLOR(BLU)
5200 A W1RECCNT 4S 0H
5400 A R OPTSF1VC SFLCTL(OPTSF1VS)
* CPD7812-.*********
* CPD7817-**********
5500 A DSPMOD(*DS4)
5600 A BLINK
5700 A 31 SFLCLR
5800 A N31 SFLDSPCTL
5900 A N31 SFLDSP
6000 A *DS4 SFLPAG(11)
6100 A *DS4 SFLSIZ(100)
6200 A 1 2DATE
6300 A EDTCDE(Y)
6400 A COLOR(BLU)
6500 A 1 55'COMPANY NAME'
6600 A COLOR(WHT)
6700 A 1122SYSNAME
6800 A COLOR(BLU)
6900 A 2 2TIME
7000 A COLOR(BLU)
7100 A 2 53'(F3/12-EXIT ENTER-UPDATE
7200 A COLOR(BLU)
7300 A 2122USER
7400 A COLOR(BLU)
7500 A 3 2'YEAR'
7600 A V1YEAR 4D O 3 7
7700 A 3 13'CODE'
7800 A V1CODE 4A O 3 18
7900 A 3 24'CUSTOMER'
8000 A V1CUST 8A O 3 33
8100 A V1NAME 40A O 3 42
8200 A V1ERR 40A O 3 85
8300 A DSPATR(BL)
8400 A COLOR(RED)
8500 A 4 2'ITEM/DESC'
* CPD7866-******
8600 A COLOR(WHT)
8700 A 4 32'OCT'
8800 A COLOR(WHT)
8900 A 4 40'NOV'
9000 A COLOR(WHT)
9100 A 4 48'DEC'
9200 A COLOR(WHT)
5722SS1 V5R2M0 020719 Data Description XZY133
9300 A 4 56'JAN'
9400 A COLOR(WHT)
9500 A 4 64'FEB'
9600 A COLOR(WHT)
9700 A 4 72'MAR'
9800 A COLOR(WHT)
9900 A 4 80'APR'
10000 A COLOR(WHT)
10100 A 4 88'MAY'
10200 A COLOR(WHT)
10300 A 4 96'JUN'
10400 A COLOR(WHT)
10500 A 4104'JUL'
10600 A COLOR(WHT)
10700 A 4112'AUG'
10800 A COLOR(WHT)
10900 A 4120'SEP'
11000 A COLOR(WHT)
11100 A 4127'TOTAL'
11200 A COLOR(WHT)
11300 A*
11400 A R OPTSF1CS SFL
11500 A W2SEL 1A B 5 2
11600 A W2CODE 4A O 5 4
11700 A W2CUST 8A O 5 10
11800 A W2NAME 40A O 5 20
11900 A W2RECCNT 4S 0H
12100 A R OPTSF1CC SFLCTL(OPTSF1CS)
* CPD7812-**********
12200 A DSPMOD(*DS4)
12300 A BLINK
12400 A 32 SFLCLR
12500 A N32 SFLDSPCTL
12600 A N32 SFLDSP
12700 A *DS4 SFLPAG(11)
12800 A *DS4 SFLSIZ(1000)
12900 A 1 2DATE
13000 A EDTCDE(Y)
13100 A COLOR(BLU)
13200 A 1 55'COMPANY NAME'
13300 A COLOR(WHT)
13400 A 1122SYSNAME
13500 A COLOR(BLU)
13600 A 2 2TIME
13700 A COLOR(BLU)
13800 A 2 60'(F3/12-EXIT)'
13900 A COLOR(BLU)
14000 A 2122USER
14100 A COLOR(BLU)
14200 A 3 2'YEAR:'
14300 A V2YEAR 4D B 3 8
14400 A 4 4'CODE'
14500 A COLOR(WHT)
5722SS1 V5R2M0 020719 Data Description XZY133
Data Description Source
SEQNBR *...+....1....+....2....+....3....+....4....+....5....+....6....+....
14600 A 4 10'CUST'
14700 A COLOR(WHT)
14800 A 4 20'NAME'
14900 A COLOR(WHT)
15000 A V2ERR 40A O 4 52
15100 A DSPATR(BL)
15200 A COLOR(RED)
15300 A*
15400 A R OPTSF1VR
15500 A DSPMOD(*DS3)
15600 A 1 2DATE
15700 A EDTCDE(Y)
15800 A COLOR(BLU)
15900 A 1 35'COMPANY NAME'
16000 A COLOR(WHT)
16100 A 1 70SYSNAME
16200 A COLOR(BLU)
16300 A 2 2TIME
16400 A COLOR(BLU)
16500 A 2 40'(F3/12-EXIT)'
16600 A COLOR(BLU)
16700 A 2 70USER
16800 A COLOR(BLU)
16900 A 4 22'THIS IS NOT A 27X132 SCREEN'
17000 A COLOR(RED)
17100 A 5 20'PLEASE CALL INFORMATIONS'
17200 A COLOR(RED)
* * * * * E N D O F S O U R C E * * * * *
* Indicator Area:
* *IN03 *IN12
* CPD7812 30 2 Message . . . . : Subfile control record ove
* CPD7817 30 1 Message . . . . : Value on SFLPAG keyword to
* CPD7866 10 1 Message . . . . : Field overlaps another fie
The CPD7817 message is for the reason specified in the documentation above. To resolve the message, add *DS3 SFLPAG(6) SFLSIZ(100) for each record with the CPD7817. In this case, there is only one record, and 6 is the highest value accepted.
The CPD7812 message is because fields in the SFLCTL record cannot overlap fields in the SFL record. The fields in SFLCTL record are overlapping fields in the SFL record because, for display size *DS3, the fields will wrap to the next line if the fields extends beyond column 80. Refer to the display file, for example:
A R OPTSF1VC SFLCTL(OPTSF1VS)
A* DSPMOD(*DS4)
A BLINK
...
A* 4 80'APR'
A* COLOR(WHT)
A* 4 88'MAY'
A* COLOR(WHT)
A* 4 96'JUN'
A* COLOR(WHT)
That text will be wrapped to the next line. The next line is 5. Refer to the SFL record:
A R OPTSF1VS SFL
A W1ITEM 25A O 5 2
A W1Q10 4D B 5 31
A W1Q11 4D B 5 39
A W1Q12 4D B 5 47
A W1Q01 4D B 5 55
A W1Q02 4D B 5 63
A W1Q03 4D B 5 71
A W1Q04 4D B 5 79
A W1Q05 4D B 5 87
A W1Q06 4D B 5 95
A W1Q07 4D B 5103
A W1Q08 4D B 5111
We see fields on line 5. Some of them are overlapped by the fields on the SFLCTL record that were wrapped.
Possible work-arounds include the following.
Note: The following is one option that you may think will work; however, it does not work. The information is included for your convenience.
Option the fields that cross column 80 or begin after column 80. In a SFL, this is called "field selection" (see description in the SFLPAG keyword section in the DDS manual). However:
a SFLPAG must equal SFLSIZ.
b The overlap message still occurs. The SFL keyword section of the DDS manual states: "fields specified in the subfile control record format cannot overlap fields specified in the subfile record format, even if they are specified with option indicators".
1. | If there is room, allow one line of space before the SFL; this does not look as good on a 27x132 but will allow room for the wrapped control record which the compiler assumes will occur. |
2. | If there is a front end (menu and so on) to the application, where the function that uses this wide-only file is selected, then the application can determine that the device is 24x80 (by looking at the row/column fields in the I/O feedback area), and put up a 24x80 message-only file. This file would have no DSPSIZ and only the format with the message. Then, the wide file would use DSPSIZ(*DS4) only and it would not need DSMOD or *DSn optioning, and it would not have the message only format in it. |
3. | If the function is called from the command line directly: a Like (3), have two files, one for the 24x80 message, the other the wide file for the SFLs. The message file has no DSPSIZ; the wide file has DSPSIZ(*DS4). b Have an INFDS structure for the wide file. Both files are opened implicitly and the INFDS structure for the wide file is initialized by RPG. If the session is narrow, the row/column fields show a screen size of 24x80. If the session is wide, the row/column fields show a screen size of 27x132. Check the ROWS value in the INFDS structure. If ROWS is 24, write the message format; otherwise, begin SFL processing for the wide file. REC1 in the example is the format in the narrow file which displays the message. Partial example: ffile1 cf e workstn infds(infods) ffile2 cf e workstn dinfods ds dROWS 152 153B 0 dCOL 154 155B 0 c rows dsply c col dsply c ROWS IFEQ 24 c exfmt REC1 c ENDIF c seton lr |
4. | If the function is called from the command line alternative 2: a Like (3), have two files: message file has no DSPSIZ; wide file has DSPSIZ(*DS4) only. b Use the QsnQryModSup Query Display Mode Support API. Pass it "4" which means "Does this device support wide?". If the response is 0, the device does not support the requested size, write the 24x80 message file. Otherwise, begin SFL processing for use with the wide file. |
5. | You can try to write a wide only file on a narrow device; however, you get CPD4169. The device file does not contain an entry for screen size. Use theexceptionn handling support of your high-level language to monitor for the message. For example, in RPG, use the *PSSR error handling routine to write out the record format that says you need to run the application on a 27 x132 display. |
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]
Historical Number
326658579
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1016277