Hello,
Hope every one doing well.
I am planning to implement F9 “Retrieve” functionality in my application. It would be great if any one can provide me the logic to implement the same.
Hope you guys can guide me in this regards.
Thanks & Regards
Bibin George
Software/Hardware used:
ASKED:
March 25, 2009 3:26 AM
UPDATED:
April 6, 2009 3:43 PM
How about this: whenever a user enters a command, save it to a physical file with the following fields–1) user name, 2) timestamp, 3) command text.
Then, use F9 to read from that file in descending timestamp order to get the commands entered by that user. Multiple users would not be affecting each other in this way as everyone would have their own ‘most-recently-used commands list’.
Just a thought. Oh, and when they exit, delete the records that pertain to them if you want. Or, once you reach the number of old commands you want to limit them to (10, 50, 100?), you could, after every new command entered, read the oldest timestamp record for that user and delete it. Again, just a thought.
Hi,
I would suggest putting any such file in the QTEMP library. That way you won’t need to remove anything at the end of the job. This would also be better for performance – if you have a lot of users with lots of commands this could get to be quite a big file to read through.
Regards,
Martin Gilbert.
Your request sounds familiar. I believe that a while back one of the iSeries journals or newsletters adddressed this issue. They showed a way to do what you want with little or no programming. Its been a while . . . I took a quick look but did not find the article. Might be worth a few minutes with Google.
Hi,
If I recall correctly, there used to be some way of retrieveing the last entered command from the joblog using a RCVMSG command. Unfortunately this stopped working if you did a CHGJOB with no logging….
Regards,
Martin Gilbert.
F9 retrieve works when we use IBM menu utility in SDA.