View previous topic :: View next topic
|
Author |
Message |
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
If I press PF1, from my ispf panel (I desinged), automatic ispf help panel is getting displayed.
But my requirement is to open up a browse mode for a PS file
I tried the below command in rexx code, But it is not working
IF PFKEY = 'PF01' THEN ISPEXEC BROWSE DATASET('LST.HELP.FILE(HELPFILE)')
I need any suggestions |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Replace the assigned command for that PF key:
zpf01 = ''
ISPEXEC VPUT (zpf01) PROFILE |
|
Back to top |
|
|
Stefan
Active User
Joined: 12 Jan 2006 Posts: 110 Location: Germany
|
|
|
|
Processing the HELP command is a complex ISPF task. You should make use of this powerful functionality instead of cutting it down to a simple browse. As a default behaviour ISPF displays a help panel when HELP is entered. This requires that the name of the help panel is specified in your panel source. When a field verification in the PROC section fails, HELP processing displays the short message section of the ISPF message definition provided with the VER statement. If the user enters HELP again without any further action, ISPF displays the long message section. Using a help panel allows the user to enter the general ISPF tutorial from this panel using "i" as primary command. Help panels can be combined as a flat sequence or hierarchically. Help panels can make use of panel areas thus allowing a scrollable panel section.
Having said all this my recommendation is to create a help panel (or a set of several panels) and connect this to the original panel with ".HELP=<name_of_the_help_panel>".
If you really need a browse on a data set because the content may change, declare a separate option on the panel to invoke the browser. Overwriting the default function key assignment is very strange to most of the users. Especially when you image what will happen when you have changed the key settings and your program crashs. The new key setting will stay in effect. You might avoid this by invoking your program with a separate application id. Then the new function key settings are written to a separate member in the user's profile dataset and do not affect the standard settings. But anyhow re-assigning function keys should be considered as last available option only. |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Hi Superk
& Stefan Thanks for your reply.
Superk, I tried ur command. Now Ispf help menu is not displayed. But
my code
IF PFKEY = 'PF01' THEN ISPEXEC BROWSE DATASET('LST.HELP.FILE(HELPFILE)')
is not working as well |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
That code worked perfectly. Here's a small testing exec I used:
Code: |
/* REXX */
/* Process inline panel and message definitions */
ddname = "$"Right(Time(S),7,"0")
memname = "ZZ"
"ALLOC NEW DEL F("ddname") DIR(2) SP(1) TR RECF(F B)
BLKS(0) LRECL(80) REU"
"ISPEXEC LMINIT DATAID(did) DDNAME("ddname") ENQ(EXCLU)"
"ISPEXEC LMOPEN DATAID("did") OPTION(OUTPUT)"
a = 1
Do 1 /* 1 Iteration for each panel/message definition */
Do a = a To 999 Until Substr(line,1,8) = "/*MEMBER"
line = Sourceline(a)
End
Parse Var line . memname .
Do a = (a + 1) To 999 While Substr(line,1,2) <> "*/"
line = Sourceline(a)
If line <> "*/" Then
Do
"ISPEXEC LMPUT DATAID("did") MODE(INVAR)DATALOC(line) DATALEN(80)"
End
End
"ISPEXEC LMMADD DATAID("did") MEMBER("memname")"
End
"ISPEXEC LMFREE DATAID("did")"
"ISPEXEC LIBDEF ISPMLIB LIBRARY ID("ddname") STACK"
"ISPEXEC LIBDEF ISPPLIB LIBRARY ID("ddname") STACK"
Drop did
"ISPEXEC VGET (zpf01) PROFILE"
savekey = zpf01
zpf01 = ""
"ISPEXEC VPUT (zpf01) PROFILE"
Do Forever
"ISPEXEC DISPLAY PANEL(TEST1)"
If rc <> 0 Then Leave
If pfkey = "PF01" Then Say "Process "pfkey" function..."
End
zpf01 = savekey
"ISPEXEC VPUT (zpf01) PROFILE"
Exit 0
/*MEMBER TEST1
)Attr Default(%+_)
! Type(Input) Intens(Low) Pad(' ') Caps(Off)
)Body Expand(//) Width(80) Cmd()
%/-/ Title /-/+
%Command ==>!zcmd
+
+Enter%Enter+to continue or%End+to Exit.
)Init
)Proc
&pfkey = .pfkey
)End
*/
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Please listen to Stefan... great advice.
=========
It looks like you are missing:
in the )PROC section of your panel.
But I would do it differently! Replace the assigned command for a PF key:
Code: |
zpf13 = 'HELPBRO'
ISPEXEC VPUT (zpf01) PROFILE |
In that way, both PF1 (the normal behavior of help) and your browse help would both work! Perhaps, simple generic help in F1 (telling about F13) and up-to-the-moment help through F13.
In your rexx (untested):
Code: |
Address ISPEXEC "VGET (ZCMD) "
IF zcmd = 'HELPBRO' THEN ISPEXEC BROWSE DATASET('LST.HELP.FILE(HELPFILE)') |
|
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
If your dialog changes the user's pf key assignment, please be sure to change it back to its original value before you terminate.
I hate it when dialog developers mess with my PFKEYs.
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
PF01 is for help, and should be left that way.
If you can, prefer using PF13 (which is also called Shift+PF01) |
|
Back to top |
|
|
|