IBM Support

Using SFLMLTCHC and SFLNXTCHG in the Same Subfile

Troubleshooting


Problem

When SFLMLTCHC and SFLNXTCHG are used, the same subfile and indicator can be used on SFLNXTCHG.

Resolving The Problem

The code below using SFLNXTCHG and SFLMLTCHC in the same display file will result in a multichoice list that preselects every item in the list, as seen in the screen shot below:

Disclaimer: This is an example only. IBM accepts no responsibility for its correctness.

Example

A DSPSIZ(24 80 *DS3)
A PRINT
A INDARA
A F12(12 'Exit/Cancel')
A*****************************************************************
A R DUMMY
A ASSUME
A DUMMYFLD A 1 2DSPATR(ND)
A*****************************************************************
A R PRSA5SFLR SFL
A SFLNXTCHG
A DESCR 16A O 4 2DSPATR(PC)
A COLOR(GRN)
A*****************************************************************
A R PRSA5CTLR SFLCTL(PRSA5SFLR)
A SFLCSRRRN(&RRN)
A 91 SFLDSP
A 92 SFLDSPCTL
A 90 SFLCLR
A N97 SFLEND
A SFLSIZ(0009)
A SFLPAG(0008)
A WINDOW(005 030 12 24)
A RMVWDW
A SFLMLTCHC(*SLTIND)
A SFLRTNSEL
A SFLRTNSEL
A WDWTITLE((*TEXT &FKEYS) (*COLOR BLU-
A ) (*DSPATR BL) *LEFT *BOTTOM)
A WTITLE1 21A O 1 2
A COLOR(BLU)
A WTITLE2 21A O 2 2
A COLOR(BLU)
A RRN 5S 0H
A FKEYS 12A P


This is a screen shot showing the results of not using a indicator on the keyword:

This shows the results of not using an indicator on the keyword.
However, if you add an indicator to SFLNXTCHG similar to the following, you receive a multichoice list where none of the items are initially selected:

A R PRSA5SFLR SFL
A 57 SFLNXTCHG
A DESCR 16A O 4 2DSPATR(PC)
A COLOR(GRN)


This is a screen shot showing the result of using an indicator on the keyword:

This shows the result of using an indicator on the keyword.
Further testing found that turning the indicator on and off in RPG code caused varying results. If the indicator is set on, all items in the list will be preselected. If the indicator is set off, none of the items in the list are preselected.

[{"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":"6.1.0"}]

Historical Number

524856115

Document Information

Modified date:
11 November 2019

UID

nas8N1012933