Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To invoke ispf browse for PS file for PF1 key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: To invoke ispf browse for PS file for PF1 key
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

Moderator Team Head


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

PostPosted: Tue Sep 06, 2011 5:08 pm    Post subject: Reply to: To invoke ispf browse for PS file for PF1 key
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    Post subject:
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    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Sep 08, 2011 4:34 pm    Post subject: Reply to: To invoke ispf browse for PS file for PF1 key
Reply with quote

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

Moderator Team Head


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

PostPosted: Thu Sep 08, 2011 6:10 pm    Post subject: Reply to: To invoke ispf browse for PS file for PF1 key
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

Senior Member


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

PostPosted: Thu Sep 08, 2011 6:22 pm    Post subject: Reply to: To invoke ispf browse for PS file for PF1 key
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: 641
Location: Whitby, ON, Canada

PostPosted: Thu Sep 08, 2011 10:01 pm    Post subject:
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: 1219
Location: Israel

PostPosted: Sun Sep 11, 2011 8:51 pm    Post subject: Reply to: To invoke ispf browse for PS file for PF1 key
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us