i5 command with key parm and prompt pgm

320 pts.
Hi, I have a command that has a key parameter which is working perfectly. The key parm is used to save that instance of the commands parameters to a data area of the same name if it does not exist. It is also used to load the command with previously entered values. This is so the user can retrieve a specific data area and load the command with predefined parameters rather than enter all of the required values over and over again. Now, they want to see all the previously saved instances. Fairly easy I thought; just do a display object command using a partial name (xxx*) to a outfile, then read that outfile, build a string and return that string (with it's length) to the command, according to the IBM website regarding prompt programs, so when the key parm field is displayed, they could press F4 and see the list and select which ever instance they want. But because of the way the command is now functioning, I’m beginning to think I cannot do this with a key parm. Here's what's happening: When typing the command on the command line and pressing F4, the entire command loads with default values, it seems the key parm processing is being bypassed and the values being returned are being displayed to the right of the key parm as choice text instead of being prompted for. Is what I'm trying to do possible with a key parm?

Answer Wiki

Thanks. We'll let you know when a new response is added.

If I understand correctly, you wish a user to be able to retrieve *any previous set of values they used for the command, analogous to using F9 on a command line to retrieve previous command entries.

This seems to imply that you have many, many, data areas – or is it one per key value?

My inclination would be to institute a file for all previous uses and users of the command, and provide a select panel over it when the user presses f4.

But perhaps you could clarify a little what you need to have happen

Discuss This Question: 1  Reply

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Floyd02
    Yorkshireman, Yes, something like an F9. The command requires several parms and allows list entry of file names, if desired. There are 2 ways to use it: 1- If they use it without entering a key parm value (the default is *NEW) everything they enter is saved to a data area that they can name via a promted parm. 2- Enter the name of a saved data area (key parm) to load those parms and list values rather than retyping everything. Now they want to see previously saved definitions so they can select. Of course this is going to require me to add another prompted parm, something to allow them to enter a description, instead of me just using a default text of "do not delete" or something like that.
    320 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: