View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Mon Jun 18, 2018 2:10 am Post subject: Capture screen input when pressing PFkey |
|
|
This is one of those weird questions similar to "how do you spell psychology".
Well, look in a dictionary under sy..... or sigh.... and you're never going to find it.
I have a macro that allows me to place the cursor on a variable in my cobol code, press a PFkey (PF14) and it'll either highlight the first definition of the variable in working-storage or edit the relevant copybook and show the variable there (assuming variable naming standards are reasonably "standard").
My problem is as follows. Assume I have a variable called w-sign in W-S.
If I insert a row into my source code, enter the word w-sign, place the cursor on this variable and immediately press PF14, it can't find the variable.
If instead, I insert a row, enter the word w-sign, press enter and THEN press PF14, it finds it.
I appreciate/assume that in the first example, somehow or other, the PF14 key is run BEFORE ISPF has read the screen, but how do I cause ISPF to simulate an enter key having been pressed before it starts running the rest of the macro (I don't want to issue a SAVE if that's a suggestion because the user should always have the option to cancel if they want to).
I'll continue searching in the meantime, but going back to the psychology question in the first paragraph - how do you search for something if you don't know WHAT to search for? _________________ Michael |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Jun 18, 2018 2:35 am Post subject: |
|
|
I would search for 'ENTER'. I have a vague feeling that it is an option on the CONTROL statement. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Mon Jun 18, 2018 4:14 am Post subject: |
|
|
Thanks Nic, but aren't you presupposing that the macro is being run from an ISPF panel (it's not).
I tried adding
Code: |
Address ISPEXEC 'CONTROL DISPLAY ENTER'
|
at the start of my script, but simply received rc 20 _________________ Michael |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Jun 18, 2018 11:59 am Post subject: |
|
|
misi01,
If you are inserting the line outside the macro then you do need to press ENTER. if you are doing within the rexx exec with LINE_AFTER then you shouldn't have to press ENTER _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|