IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To invoke ispf browse for PS file for PF1 key


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Tue Sep 06, 2011 3:17 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Sep 06, 2011 5:08 pm
Reply with quote

Replace the assigned command for that PF key:

zpf01 = ''
ISPEXEC VPUT (zpf01) PROFILE
Back to top
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Tue Sep 06, 2011 5:37 pm
Reply with quote

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
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Thu Sep 08, 2011 4:09 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Sep 08, 2011 4:34 pm
Reply with quote

This previous topic might be helpful.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Sep 08, 2011 6:10 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Sep 08, 2011 6:22 pm
Reply with quote

Please listen to Stefan... great advice.

=========

It looks like you are missing:
Code:
  &PFKEY = .PFKEY
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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Sep 08, 2011 10:01 pm
Reply with quote

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.

icon_evil.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Sep 11, 2011 8:51 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top