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
 

 

How to come out of the panel by pressing some Function Key ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
ermanjitsingh

New User


Joined: 08 Jun 2009
Posts: 19
Location: Banglore

PostPosted: Mon Jul 13, 2009 4:07 pm    Post subject: How to come out of the panel by pressing some Function Key ?
Reply with quote

Hi.

I am working on one automated tool.
In my tool I have one panel, rexx code and then skeletons.

High level View: In my rexx code , whatever value we are going to store in the table form thru the panel. And then rexx code doing file tailoring on the skeleton for all the records in the table.

And after that if I press F3 then only my code is going to execute and output is going to generate.


My requirement is like on pressing any function key like F4 it will execute the code and come out of the panel.

Current Scenario:

But rt now after entering the values in the panel and i have to press F3 to create the output and to come out of the panel.


Can anyone please help me in coding that by pressing any function key it execute the code and exit from the panel ?
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: Mon Jul 13, 2009 4:38 pm    Post subject: Reply to: How to come out of the panel by pressing some Func
Reply with quote

I'm not following you.

2.5 DISPLAY--display panels and messages.

Quote:

After the panel has been displayed, you can enter information and press the Enter key. All input fields are automatically stored into dialog variables of the same name, and the )PROC section of the panel definition is then processed. If any condition occurs that causes a message to be displayed (verification failure, MSG=value condition in a TRANS, or explicit setting of .MSG), processing continues to the )HELP or )END section. The )REINIT section is then processed if it is present. The panel is then redisplayed with the first, or only, message that was encountered.

When the user presses the Enter key again, all input fields are stored and the )PROC section is again processed. This sequence continues until the entire )PROC section has been processed without any message conditions being encountered. The panel display service finally returns, with a return code of 0, to the dialog function that invoked it.

Alternatively, when a panel is displayed, the user can enter a CANCEL, END, EXIT, or RETURN command. If the input fields are not in a scrollable area, they are stored and the )PROC section is processed. In scrollable areas, only the input fields that have been displayed will be stored. No messages are displayed, even if a MSG condition is encountered. The panel display service then returns to the dialog function with a return code of 8.


So, the user can press enter, which is usually done to process the panel, receive the zero return-code from the DISPLAY service, and continue through the processing. Otherwise, the use can use the END or CANCEL or EXIT commands to receive the non-zero return-code from the DISPLAY service and return back to the calling program code.

ISPF users are not usually accustomed to using non-standard PF keys to accomplish a specific task. You shouldn't require a user to change their PFK command settings just to match your application.

If neither of the standard options are useful, I usually add a command-line function such as CONFIRM or GO or RUN, and then on the return-code value of zero, check the value of the ZCMD variable and go from there.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Jul 13, 2009 9:16 pm    Post subject: Reply to: How to come out of the panel by pressing some Func
Reply with quote

Quote:
And after that if I press F3 then only my code is going to execute and output is going to generate.


The user will expect your code NOT to run when F3 is pressed. Otherwise, how does the user say not to proceed?
Back to top
View user's profile Send private message
ermanjitsingh

New User


Joined: 08 Jun 2009
Posts: 19
Location: Banglore

PostPosted: Tue Jul 14, 2009 5:15 pm    Post subject: Re: Reply to: How to come out of the panel by pressing some
Reply with quote

Thanks Kevin & Pedro for your reply.


Quote:


The user will expect your code NOT to run when F3 is pressed. Otherwise, how does the user say not to proceed?


Thats what i want to to allow user to no proceed when he press F3 and to generate the output when he press PF4.

I have done some R&D and found something. To achieve this:

we need to include following line in panel:

)PROC
/* Process )BODY fields here */
&kpress = .PFKEY

and rexx code we can check for this press key:

if kpress = 'PF03' then do
exit

I tried this, exit is working fine if user press PF3 but don't know how to proceed with F4 if i want to create my output if user press F4.
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 Jul 14, 2009 6:34 pm    Post subject: Reply to: How to come out of the panel by pressing some Func
Reply with quote

Well, the procedure will pretty much be this:

1. Retrieve and store the user's current settings for PF3 and PF4.
2. Change the user's setting for PF3 and PF4 to a standard ISPF command (END works nicely).
3. Display the panel, but instead of checking for the return-code value, instead check for the value of your pfkey variable (the variable you assigned in the )Proc section of the panel).
4. Take the appropriate action.
5. Before you end, make sure you restore the user's original PF Key settings.

Code:

)Attr ...
)Body ...
)Init
)Proc
  &pfkey = .pfkey
...
)End


Code:

Do Forever
  "ISPEXEC VGET (zpf03 zpf04) PROFILE"
  save_f03 = zpf03
  save_f04 = zpf04
  Parse Value "END END" With zpf03 zpf04
  "ISPEXEC VPUT (zpf03 zpf04) PROFILE"
  "ISPEXEC DISPLAY PANEL(panel)"
  zpf03 = save_f03
  zpf04 = save_f04
  "ISPEXEC VPUT (zpf03 zpf04) PROFILE"
  If pfkey = "PF03" Then Leave
  If pfkey = "PF04" Then Do Something Else
End
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Jul 14, 2009 9:18 pm    Post subject: Reply to: How to come out of the panel by pressing some Func
Reply with quote

Quote:
2. Change the user's setting for PF3 and PF4 to a standard ISPF command (END works nicely).
...
5. Before you end, make sure you restore the user's original PF Key settings.


I disagree with that approach because typically they are global changes. Your split screen session will be affected. Also, those keys can be customized by the user... you should not replace my customization even if only for the duration of the panel.

I suggest:
1. define a keylist with F4=PROCEED
2. alter your panel to refer to the keylist
3. in your rexx, check ZCMD for 'PROCEED'
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 ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
No new posts Design of ISPF panel prino TSO/ISPF 2 Wed Jan 25, 2017 10:31 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm


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