Anyone want to play with this here you go...

%USERTEST;4
results in a single line returned:
"USER SELECTED OPTION 4".

%USERTEST NONDISP;4
results in the panel being displayed with "4" in the ZCMD field...
Command ===> 4

Options - 1 - One
        - 2 - Two
        - 3 - Three
        - 4 - Four
-----
Information obtained from NONDISPL panel:
  NAME  = Walter
  DEPT  = RACF Guru
  PHONE = 555-654-3210

Oddly, %USERTEST NONDISP;;4 (one extra semicolon) works exactly as one might expect. I still think that as PANEL0 is never displayed due to the NONDISPL request, the extra semicolon should not be required.

---------------------------------------------------

USERTEST Clist:
------------------
PROC 0 &NONDISP
IF (&NONDISP ¬= &STR()) THEN DO
  ISPEXEC  CONTROL  NONDISPL  ENTER
  ISPEXEC  DISPLAY  PANEL(PANEL0)
END
ISPEXEC  DISPLAY  PANEL(PANEL1)
SET &OPTION = &ZCMD
WRITE USER SELECTED OPTION &OPTION

PANEL0:
----------
)ATTR DEFAULT(%+_)
)BODY CMD()
%
)INIT
&NAME='Walter'
&DEPT='RACF Guru'
&PHONE='555-654-3210'
)PROC
)END

PANEL1:
----------
)ATTR DEFAULT(%+_)
)BODY EXPAND(//) CMD(ZCMD)
%-/-/- ISPF STACK TESTING -/-/-
+Command ===>_ZCMD
+
+ Options - 1 - One
+         - 2 - Two
+         - 3 - Three
+         - 4 - Four
+
+ -/-/-
+ Information obtained from NONDISPL panel:
+   NAME  = &NAME
+   DEPT  = &DEPT
+   PHONE = &PHONE
)INIT
)PROC
VER (&ZCMD,RANGE,1,4)
)END


Dan

Dan D wrote:
Walt,

Yes, normally "DIALOG;4" would bypass the 1st panel and pass "4" as
it's ZCMD value.  The difference between that and the NONDISPL panel
is that if the ";4" was not specified the panel would be displayed. The NONDISPL panel will NEVER be seen by the user thus the next
segment of the stacked command should not be removed (at least I
don't believe it should...ISPF development may think differently).

To make it easier to explain to the Q&A group, I'll get a model CLIST
that provides an example of this problem before openning a PMR.

Thanks for your help Walt.
Dan


Walt Farrell wrote:
On Tue, 21 Jun 2011 09:40:39 -0400, DanD <mvs-j...@sympatico.ca>
wrote:

The )BODY section of the USERINFO panel does contain CMD().
As it is never displayed it only contains a single line of blanks
with an attribute byte as the 1st character.  You get an error when
you have a
null )BODY section.

Are you saying that the ";4" is returned with the display of he
USERINFO panel, even though the user will never actually see this
panel?  That doesn't sound logical to me.

Yes, that's what I'm suggesting has happened. As for not being
logical, you may be right. But note that even without your code, in
"DIALOG;4" the user never sees the first panel the dialog would
display, but the "4" is used as though he had seen it. To me, this is
very similar. In both cases, the "4" is used (I think) in response to
the first display the dialog performs, and in both cases the user is
not seeing that first-displayed panel.


When I zap the code to branch around the call to the module that
CONTROL,NONDISPL/DISPLAY's the USERINFO panel the "DIALOG;4" works
as I would expect...option 4 is selected from the first DISPLAYed
panel.  When the CONTROL,NONDISPL/DISPLAY code is invoked, to get
the same results I have to enter "DIALOG;;;4" (why 2 extra
simicolons?).

I can't explain why you need "DIALOG;;;4" rather than "DIALOG;;4"
which I would have expected.

Does this sound like a bug to you?   Is a PMR suggested?

Perhaps a Q&A type of PMR, if you have a support contract that allows
you to ask questions. As I'm not part of the ISPF team here at IBM
I'm not suggesting you've found an ISPF bug.

I would start by trying to work around this (or researching it
further) by defining a command field on your non-display panel, and
seeing what you get when the user enters "DIALOG;4". If you get the
4, then you can perhaps pass that back to your dialog for it to
operate on, and you have an immediate workaround for your problem.

Whether you should need to do that, or not, I really can't say.
Someone from ISPF may know, but I don't. And perhaps this is more
appropriate for the ISPF-L list than for IBM-MAIN.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to