320 pts.
 i5 command with key parm and prompt pgm
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?

Software/Hardware used:
ASKED: May 27, 2009  4:16 PM
UPDATED: July 7, 2009  2:44 PM

Answer Wiki:
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
Last Wiki Answer Submitted:  July 7, 2009  2:20 pm  by  Yorkshireman   5,505 pts.
All Answer Wiki Contributors:  Yorkshireman   5,505 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.