IBM Support

Command Shows Parameters after First Prompt Controlled Parameter in Some Cases

Troubleshooting


Problem

Normally a command will show parameters up to and including the first prompt control parameter, and you must use PF9 to see the rest. If the first prompt controlled parameter is on the bottom line of a screen, you can page down and see the rest without pressing PF9

Resolving The Problem

Normally a command will show parameters up to and including the first prompt control parameter, and you must use PF9 to see the rest. This was designed to mimic the behavior of the System/36. If the first prompt controlled parameter is on the bottom line of a screen, you can page down and see the rest without pressing PF9. This could make two similar commands behave differently because of the location of the first prompt controlled (PMTCTL keyword).

The iSeries has always behaved this way, and there are no plans to change this behavior. To change it now would mean that some existing commands would now behave differently.

In order to get around this behavior, you could write your command so that the first prompt controlled parameter does not fall on the last line of the screen (when the command is prompted). This could require that you change the order of your parameters.

Here is an example of a command that exhibits this behavior:

    • - Command Source



      CMD PROMPT('ORDER FRUIT')
      parameter KWD(STRAWBERRY) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Strawberries . . . ')
      parameter KWD(GRAPES) TYPE(*DEC) LEN(3) PROMPT('Pounds +
      of Grapes . . . . . . ')
      parameter KWD(BANANAS) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Bananas . . . . . ')
      parameter KWD(RASPBERRY) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Raspberries . . . ')
      parameter KWD(PLUMS) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Plums . . . . . ')
      parameter KWD(KIWI) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Bananas . . . . . ')
      parameter KWD(Pears) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Pears . . . . . . ')
      parameter KWD(Lemons) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Lemons . . . . . . ')
      parameter KWD(Limes) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Limes . . . . . . ')
      parameter KWD(Cherries) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Cherries . . . . . ')
      parameter KWD(BlackberrY) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Blackberries . . . ')
      parameter KWD(BlueBerry) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Blueberries . . . ')
      parameter KWD(PINEAPPLE) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Pineapple . . . ')
      parameter KWD(Mango) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Mangos . . . . . . ')
      parameter KWD(WaterMelon) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Watermelon . . . . ')
      parameter KWD(APPLES) TYPE(*CHAR) LEN(3) RSTD(*YES) +
      VALUES(YES NO) PROMPT('ORDERING APPLES? . +
      . . . . . ')
      parameter KWD(BRABURN) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds Braburn Apples. . . . ') +
      PMTCTL(PMTAPPLE)
      parameter KWD(GRANNY) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds Granny Smith Apples . ') +
      PMTCTL(PMTAPPLE)
      parameter KWD(FUJI) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Fuji Apples. . . . ') +
      PMTCTL(PMTAPPLE)
      parameter KWD(CRANBERRY) TYPE(*DEC) LEN(3) +
      PROMPT('Pounds of Fuji Cranberries . ')

      PMTAPPLE: PMTCTL CTL(APPLES) COND((*EQ YES))


      Displays command where first prompt controlled field is on the last line of the screen.

    Notice 'More . . .' (circled in red). Normally, because APPLES is the first parameter that uses prompt control, it would say 'Bottom' instead and, to get the rest of the parameters, you would have to press PF9; however, when the first parameter that uses prompt control is on the last line, it allows you to page down and see the rest of the parameters without pressing PF9.

    If you were to remove the Watermelon parameter (or put it below APPLES), you would receive the following:
      Displays command where the first prompt controlled parm is not on the last line.

    Notice it says 'Bottom', and additional parameters will only be displayed if you press PF9.

    [{"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

    585683185

    Document Information

    Modified date:
    18 December 2019

    UID

    nas8N1011803