2025-02-18 16:56:03 -05:00
..
2025-02-18 16:47:31 -05:00
2025-02-18 16:47:31 -05:00
2025-02-18 16:47:31 -05:00
2025-02-18 16:56:03 -05:00

SNGCHCFLD/MLTCHCFLD DSPF Keywords

The question asked was "How can I use the keywords SNGCHCFLD/MLTCHCFLD in protected mode?"

I had never used these pseudo graphical 5250 features, so all I could initially do was point to the IBM documentation for SNGCHCFLD (Single-Choice Selection Field) and MLTCHCFLD (Multiple-Choice Selection Field) keywords.

Another user pointed to the CHCCTL documentation.

I remembered that the late Booth Martin had extensive DSPF examples at his website.

Based on what Booth had done, I created this program to demonstrate what could be done to hide and protect single choice selections fields.

When program BOOTH is called, the display looks like this, with Choice 7 already selected by default:

alt text

Select a choice with your mouse, or using the down and up arrow keys and the space bar.

Selecting Choice 2 and pressing enter show this:

alt text

Every other time you press enter Choice 6 appears or disappears, by flipping *IN01.

If you clear the default selection and make no selection, then zero is returned for that choice:

alt text

Booth.DSPF

The display file.

Booth.RPGLE

A minimal program to drive the display file, deliberatly kept short.