Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementing PF10 and PF11 in REXX driven ISPF Panel

Status
Not open for further replies.

artemisiagenipi

Technical User
Aug 16, 2007
1
CH
Hello everybody,
I have tried to implement the sample provided in thread thread277-784281 .
However, whenever I press PF10 or PF11, I get message "RIGHT (or LEFT)" is not active on the panel.
Obviously it has to do with the ISPF Panel coding, since the PF Key assigment is not passed to the driving REXX...
Any suggestions?
Thanks in advance
 
I had a similar requirement.
I did the following (it worked for me):

/* REXX */
...
...
Do Until PFK = 'PF03'
Select
When PFK = 'PF08' then i = i + 1
When PFK = 'PF07' then i = i - 1
When PFK = 'PF19' then i = 1
When PFK = 'PF20' then i = InRec.0
Otherwise Nop
End
If i < 1 then i = 1
If i > InRec.0 then i = InRec.0 + 1
Call DisplayPanel
End
...
...
...
DisplayPanel:
/* set panel values */
...
"ISPEXEC VGET (ZPF07, ZPF08, ZPF19, ZPF20) PROFILE"
HPF07 = ZPF07
HPF08 = ZPF08
HPF19 = ZPF19
HPF20 = ZPF20
ZPF07 = 'END' /* Prev record */
ZPF08 = 'END' /* Next record */
ZPF19 = 'END' /* First record */
ZPF20 = 'END' /* Last record */
"ISPEXEC VPUT (ZPF07, ZPF08, ZPF19, ZPF20) PROFILE"
"ISPEXEC DISPLAY PANEL(PANELNAME)"
ZPF07 = HPF07
ZPF08 = HPF08
ZPF19 = HPF19
ZPF20 = HPF20
/* say "PFK="PFK */
"ISPEXEC VPUT (ZPF07, ZPF08, ZPF19, ZPF20) PROFILE"
If Left(PFK,2) = 'PF' then Return
...
/* process panel values */
...
Return
 
The prior thread unfortunately did not make clear that you have to disable the keys you're going to use for scrolling right and left.

First, find out what the original settings are and save those values:
Code:
"VGET (ZPF10 ZPF11) PROFILE"
save_f10 = zpf10
save_f11 = zpf11
Now, where the panel gets displayed, block the PFKeys, display the panel, then immediately restore the saved settings:
Code:
      parse value "END   END"   with zpf10 zpf11  .
      "VPUT (ZPF10 ZPF11) PROFILE"
"TBDISPL" $tn$ "PANEL(MLDISP)"
disp_rc = rc
      zpf10 = save_f10
      zpf11 = save_f11
      "VPUT (ZPF10 ZPF11) PROFILE"

if pfkey = "PF03" | disp_rc > 4 then leave

if WordPos(pfkey,"PF10 PF11") > 0 then do ....
While the panel is active, PF10 and PF11 both return "END". The panel logic must also tell the application which PFKey is returning this "END":
Code:
)PROC
  &PFKEY = .PFKEY
)END
There's a slick method for computing which format you have to use also, and I'll post that next.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Code:
/*
   Cycle between styles.  If there were 5 styles:
   To go to the next style:  (style//stylect) + 1:
          1   2   3   4   5
          1   2   3   4   0    (mod stylect)
          2   3   4   5   1    (add one)
   To go to the prior style:  (style+stylect-2)//stylect + 1
          1   2   3   4   5
          6   7   8   9  10    (+stylect)
          4   5   6   7   8    ( -2 )
          4   0   1   2   3    ( //stylect)
          5   1   2   3   4    ( +1 )
   This works regardless of the number of styles; it even works when
   the number of styles is 1!
.  ----------------------------------------------------------------- */
BDDK_CHECK_STYLE:                      /*@                           */
   address TSO

   select

      when pfkey = "PF11" then,
         style = style//stylect + 1    /* next style                 */

      when pfkey = "PF10" then,
         style = (style+stylect-2)//stylect + 1       /* prev style  */

      otherwise nop
   end

return                                 /*@ BDDK_CHECK_STYLE          */

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top