Overriding PFkeys



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Overriding PFkeys

Postby Quasar » Sun Apr 07, 2013 9:37 am

Hi everyone,

I have written the following code to override the default ISPF Key assignments. I would like PF7(Scroll-Up) and PF8(Scroll-Down) to be handled by my application. However, the PF07 and PF08 keys still default to UP and DOWN.

   ZPF7 = 'PREV'
   ZPF8 = 'NEXT'
   Address Ispexec "ADDPOP"
   Address Ispexec "VPUT (ZPF7,ZPF8) PROFILE"
   Say 'VPUT RC: ' RC
   Address Ispexec "DISPLAY PANEL(DYNAREA)"
   DISPLAY_RC = RC
   ADDRESS ISPEXEC "REMPOP"
   RETURN


At this point, I do not wish to define a new keylist with an APPLID. I tried searching the forum and other articles on the Internet, to override Pfkeys. But, I think I am missing something. Below is my ISPF Panel WYSIWIG code.

)ATTR                                                                   
@ AREA(DYNAMIC) SCROLL(OFF)                                             
Y TYPE(CHAR) COLOR(TURQUOISE) HILITE(REVERSE)                           
~ TYPE(CHAR) COLOR(GREEN)                                               
$ TYPE(DATAIN) COLOR(TURQUOISE) HILITE(REVERSE)                         
_ TYPE(NEF) PADC(_)                                                     
| TYPE(TEXT) COLOR(YELLOW)                                             
ยข TYPE(DATAOUT) COLOR(BLUE)                                             
? TYPE(NT)                                                             
)BODY WINDOW(76,12) CMD(ZCMD)                                           
|                        MINE - Structure Chart Generator               
?Command ==> _ZCMD                                                     
?                                                                       
+@DYNVAR,SHADVAR                                                       
+@                                                                     
+@                                                                     
+@                                                                     
+@                                                                     
+@                                                                     
+@                                                                     
+@                                                                     
+@                                                                     
)PROC                                                                   
&PFKEY=.PFKEY                                                           
)END                                                                   


Thank you very much.
Quasar Chunawala,
Software Engineer, Lives at Borivali, Mumbai
User avatar
Quasar
 
Posts: 102
Joined: Wed Nov 10, 2010 7:11 pm
Location: Borivali, Mumbai
Has thanked: 13 times
Been thanked: 2 times

Re: Overriding PFkeys

Postby Pedro » Mon Apr 08, 2013 6:56 pm

Try using 07 and 08.
Pedro Vera

These users thanked the author Pedro for the post:
Quasar (Wed Apr 10, 2013 11:23 pm)
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Overriding PFkeys

Postby prino » Mon Apr 08, 2013 8:17 pm

And if your application falls over, the user looses his or her PF7/8 settings.

Don't mess around with PF key settings, unless you create your own keylist or set the code up to run under a new APPLID:

parse value source with . . moi .

"ispexec vget (zapplid)"
if zapplid \= 'OOPS' then
  do
    "ispexec select cmd(%"moi {any parms}") newappl(OOPS)"
    exit
  end
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

These users thanked the author prino for the post:
Quasar (Wed Apr 10, 2013 11:23 pm)
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Overriding PFkeys

Postby Pedro » Tue Apr 09, 2013 12:00 am

create your own keylist or set the code up to run under a new APPLID:

agree.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Overriding PFkeys

Postby Quasar » Wed Apr 10, 2013 11:26 pm

Thanks Pedro, it worked ZPF07 and ZPF08. I will now create a new key-list and run the application under my APPLID.
Quasar Chunawala,
Software Engineer, Lives at Borivali, Mumbai
User avatar
Quasar
 
Posts: 102
Joined: Wed Nov 10, 2010 7:11 pm
Location: Borivali, Mumbai
Has thanked: 13 times
Been thanked: 2 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post