Question about accessing internal object *PTCSPC programmatically from my job
"Dave Fiorillo" <dfiorillo-3af1bs0Ib9W00s0LW7PaslaTQe2KTcn/@public.gmane.org> Mon, 10 May 2010 18:06:12 -0400
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
Hi, Please be easy on me - I am working hard to pick up some MI knowledge on my own by looking at examples and reading posts so if I sound like a greenhorn - its because I am! Anyway this is what I am up to. I have been "challenged" to find a way to determine from a program that gets called to be able to figure out what the last function key was that was pressed. I cant use the INFDS directly, because I am running in a different program than the program where the DSPF is defined (DDS), and the handling of the function key being pressed. For example, Program A has the logic that when F9 is pressed - then call program B - and I am program B. So, in Program B I want to be able to retrieve from memory what was the last function key pressed in Program A. Its ok if I have to tell Program B the name of the display file for now, but phase 2 might be nice to be able to figure out the last display file used. What I have been able to figure out so far, by using DMPJOB, is that when I search on the DSPF name in the dump, I can consistently see a space defined with the identifier of "19 FC" for the display file used in program A, and at offset x'7D3' from this particular section is the AID byte of the function key. I am assuming that this is the place in memory of the job that stores the INFDS for program A. I tried this with 5 different function keys and got consistent results with the AID byte so I am very hopeful that this is the sweet spot in memory (at least for V5R4). My question: is there an easy way to access this information using MI? >From my research so far, I have learned that a "19 FC" is a *PTCSPC internal object to the job, and I keep scouring the dump to try and glean more information. Any help from the experienced would be greatly appreciated. Thanks. Dave _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.