Page 1 of 1

Problem With Panel Display

PostPosted: Fri Jul 24, 2009 6:05 pm
by eprasad629
Hi,

I'm trying to create a menu/option driven utility through ISPF panels.

I'm able to display the main panel (Invoked by a REXX program by means of display panel (panel name). However when I key in the option and hit enter, control is being passed to the next line of the REXX program which invokes the panel. I’m unable to display the sub panel or REXX program for selected option.

Could you please give me your valuable suggestions on this?

Re: Problem With Panel Display

PostPosted: Fri Jul 24, 2009 6:29 pm
by MrSpock
I'm not quite sure what you're getting at here.

When you use the DISPLAY service in ISPF, there are two normal events that occur after a panel is displayed. These are reflected in the return-code value set by the DISPLAY service:

return-code = 0 is a normal completion. This occurs when the user presses Enter and all of the requirements for the panel variables are met in the )PROC section.

return-code = 8 is a user-requested termination. This occurs when the user enters the END or RETURN command.

Each event can be processed as needed by your program at the moment they occur. Usually, Enter (RC=0) is the event to continue forward to the next step of the process, where END/RETURN (RC=8) is the event to move backwards to the previous step, or to completely terminate the dialog session.

Re: Problem With Panel Display

PostPosted: Mon Jul 27, 2009 3:04 pm
by eprasad629
Hello MrSpock,

Thanks a lot for replying.

I'm getting RC 0 at the end of the execution. However, although I have coded the next panel to be followed from ZSEL, the control is not passed. The control remains in the same rexx program which calls the panel.

Instead, should I capture the selected option from the main rexx program which calls the panel and proceed accordingly?

Could you please suggest where the stuff is going wrong?

Many thanks in advance.

Re: Problem With Panel Display

PostPosted: Mon Jul 27, 2009 3:59 pm
by MrSpock
ZSEL is only used if the panel is invoked via the ISPF SELECT Service (ISPEXEC SELECT PANEL(panedlid) ...). It doesn't work on panels invoked via the DISPLAY Service.

Re: Problem With Panel Display

PostPosted: Mon Jul 27, 2009 6:09 pm
by expat
You also need to read the ISPF manuals to learn the difference between a primary menu panel and a panel ordinaire.

Re: Problem With Panel Display

PostPosted: Tue Jul 28, 2009 12:18 pm
by eprasad629
Hi MrSpock & Expat,

Thanks a lot. I tried with SELECT Panel and it works.

Many thanks for your help.