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

panel creation question


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

New User


Joined: 15 Jan 2015
Posts: 72
Location: USA

PostPosted: Mon Jan 31, 2022 2:08 am
Reply with quote

I am creating a panel - very simple - just to get a person's email, since some of the jcl will email a report to a user.

My main panel selects this panel if the person clicks on the option for this. The panel just displays the profile values it has and allows the user to set them up/change them.

I do some basic error checking. the screen redisplays until the user enters END. but the panel keeps flipping to screen 1 if I enter the last character of the last field. so strange.

just wondering if anyone knows what would cause this?

here is the panel logic:
Code:
)ATTR
 \ TYPE(TEXT)   SKIP(ON) INTENS(LOW) COLOR(GREEN)
 % TYPE(TEXT)   SKIP(ON) INTENS(HIGH)
 + TYPE(TEXT)   SKIP(ON) INTENS(LOW)
 < TYPE(INPUT) PAD('_') CAPS(OFF) color(TURQUOISE)
)BODY EXPAND(||)
%-|-|- IRMF Dialogue User General Information -|-|-
%COMMAND ===>_ZCMD                                                             +
+
+ This information is needed to create information in some JCL
+
\  First         %===><Z                                                       +
\  Middle Init.  %===><Z+                                                      +
\  Last          %===><Z                                                       +
+
+ *You only need to enter Primary Email below if your email is not:
+      First.M.Last@xxx.com
+
\  Primary E-Mail%===><Z                                       +@xxx.com       +
+
+
\ Default Endevor Environment for testing%==><Z   +  (DEVS/DEVL/etc)
+
+
)INIT
  .HELP = ZT010000
  .ZVARS='(T01FN T01MI T01LN T01EM1 T01ENV)'
  .CURSOR=T01FN
   IF (&t01env = ' ')
   &t01env = 'DEVS'

)PROC

  VER (&T01FN,NB MSG=LYN@011)
  VER (&T01MI,NB MSG=LYN@012)
  VER (&T01LN,NB MSG=LYN@013)

  /* process email */

  IF (&T01EM1 = '')
    &T01E1 = '&t01fn..&T01mi..&t01ln.@xxx.com'
  ELSE
    .cursor = T01EM1
    &t =TRUNC(&t01em1,'@')
    &x = .trail
    IF (&x = '')
      &x = '@xxx.com'
    if  (&x NE '@xxx.com')
      .MSG=LYN@015
    VER (&t,NB,INCLUDE,ALPHAB,NUM MSG=LYN@016)
    &T01E1 = '&t.@xxx.com'

  &T01ENV = upper(T01ENV)

  &T01 = 'T01FN T01MI T01LN T01E1 T01ENV'
  VPUT (T01 &T01) PROFILE

  &zsel = Trans(&zcmd X,'EXIT' ' ',' ' *,'?' )

)END

and here is a picture of the panel:
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Mon Jan 31, 2022 10:54 am
Reply with quote

Can you clarify what you mean by 'screen 1'?

Can you provide the statement from the menu that invokes this panel?

Also, Enter should be 'proceed' with action. While END should be do not proceed but instead return to caller.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 629
Location: Denmark

PostPosted: Mon Jan 31, 2022 6:51 pm
Reply with quote

How do you invoke the panel, your description implies a SELECT PANEL from the major panel?
I'm not sure what could cause the behaviour you see "panel keeps flipping to screen 1". I assume that you mean that the panel ends? One possible cause could be that one of the messages are not correctly defined.

A few notes:
There really is no reason for using the ZVARS feature for fields wide enough to hold the variable name. But that is a matter of preference.
In my opinion you don't really need a specific message for a VERIFY NB, or any VERIFY for that matter. Again a matter of preference.

Use this small piece of code to test the panel. The display of the ZERRLM variable shuld tell you what's wrong. The DO 4 is a safeguard against a run-away loop.
Code:
/* rexx */                           
trace r                             
 address ispexec                     
 do 4                               
   "display panel(your-panel-name)" 
   zz=zerrlm                         
   if rc>0 then leave               
 end   
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Mon Jan 31, 2022 11:45 pm
Reply with quote

Quote:
if I enter the last character of the last field


Please confirm that you fill in the last character AND then press Enter or a PF key.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Feb 01, 2022 3:06 am
Reply with quote

Learn how to use the panel trace! It should shed some light on your problem.

1. issue ISPDPTRC from the ISPF command line. This starts the trace.
2. recreate your problem.
3. issue ISPDPTRC from the ISPF command line, a second time. This ends the trace and shows you the trace file.

It would be great if you showed us interesting parts of the trace.

More info about the trace: www.ibm.com/docs/en/zos/2.2.0?topic=dti-panel-trace-command-ispdptrc
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 72
Location: USA

PostPosted: Thu Feb 03, 2022 7:06 am
Reply with quote

Thank you, everyone. I really appreciate it. I am saving your suggestions to try out tomorrow.

here is the previous panel that calls the one that posted first. it is just a simple selection panel, with option 1 going to the panel in my first post:
Code:
)ATTR                                                                           
 _ TYPE(NEF) PAD(USER)                                                         
 + TYPE(TEXT) INTENS(LOW) SKIP(ON)                                             
 % TYPE(TEXT) INTENS(HIGH) SKIP(ON)                                             
 \ TYPE(TEXT) INTENS(HIGH) SKIP(ON) COLOR(GREEN)                               
 ~ TYPE(TEXT) INTENS(HIGH) SKIP(ON)                                             
 # TYPE(TEXT) INTENS(NON) SKIP(ON)                                             
)BODY EXPAND(||)                                                               
%-|-|-   Dialogue Options Menu -|-|-                                         
%OPTION  ===>_ZCMD                                                             +
+                                                                               
~1 +Profile       \Define Your  Profile                                     
~2 +JCL/Jobcard   \Define JCL JOB Card defaults                                 
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
%                                                                               
+Enter~END+command to terminate LYN@ Dialogue Options Menu\ | | &ZSYSID         
)INIT                                                                           
  .HELP=ZT000000                                                               
  .CURSOR=ZCMD                                                                 
)PROC                                                                           
&ZQ = &Z                                                                       
  IF (&ZCMD ^= ' ')                                                             
    &ZQ = TRUNC(&ZCMD,'.')                                                     
    IF (&ZQ = ' ')                                                             
      .MSG = ISRU000                                                           
  &ZSEL = TRANS( &ZQ                                                           
                1,'PANEL(z@01)'                                                 
                2,'PANEL(z@02)'                                                 
              ' ',' '                                                           
                X,'EXIT'                                                       
                *,'?' )                                                         
  &ZTRAIL = .TRAIL                                                             
)END                                                                           


Pedro, I wrote a rexx exec that automatically sets up 8 swap screens for me when I log on. If I bring up this panel on a screen other than the first 1 - When I select option 1, and go to the panel in my first post, then change the last char in the last entry (example: DEVS to DEV2), it flips me to screen 1.

it's weird. only the last char does it.

but basically, all this screen is supposed to do is set some profile variables for the user (with some basic error checking) - and just redisplay the screen either with the updated values or an error message.
Then when the user is satisfied, they enter END (PF3) and return to the previous screen.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 629
Location: Denmark

PostPosted: Thu Feb 03, 2022 3:04 pm
Reply with quote

Not sure it has anything to do with your problem, but the &ZSEL= statement you have at the end is not relevant for a display panel.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 629
Location: Denmark

PostPosted: Thu Feb 03, 2022 3:42 pm
Reply with quote

something else, you have
IF (&t01env = ' ')
&t01env = 'DEVS'
I assume that the IF should be moved 1 to the left, otherwise t01env will always be set to DEVS
You could combine into one statement
IF (&t01env = ' ') &t01env = 'DEVS'
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 72
Location: USA

PostPosted: Wed Feb 09, 2022 6:41 am
Reply with quote

Pedro wrote:
Quote:
if I enter the last character of the last field


Please confirm that you fill in the last character AND then press Enter or a PF key.


think this is what I am doing wrong. I am attaching a picture of the screen as it looks when I try this, and the trace. Notice Racf is screen 1. and where I try this panel is on screen 8.

What I think is happening, is when I type in the last character of the last field, the cursor jumps to the last line of the first column, or where I have the swap screen name on the swap bar. Then I hit enter. but, I was hitting enter immediately after I typed in the last character, so I didn't see that cursor jump. but when I looked at the trace, I just typed in the last character, and bang, the cursor was at the first swap screen name.

so, I think my panel isn't set up right so that the cursor has some place to go after the last char is entered. I probably should initially set the cursor to zcmd, so it returns to the top of the page if no errors.

I will try that tomorrow. but I hope someone can comment on a better way.

anyway, Pedro, your comment made me really look at the cursor, so thanks.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Feb 10, 2022 3:15 am
Reply with quote

I think you are right about the cursor jumping to the swapbar. I recommend that you use a new attribute character with SKIP(OFF) and change the end of the last input field '+' to use the new character. See '~' below as an example.

Code:

)ATTR
 \ TYPE(TEXT)   SKIP(ON) INTENS(LOW) COLOR(GREEN)
 % TYPE(TEXT)   SKIP(ON) INTENS(HIGH)
 + TYPE(TEXT)   SKIP(ON) INTENS(LOW)
 ~ TYPE(TEXT)   SKIP(OFF) INTENS(LOW)
 < TYPE(INPUT) PAD('_') CAPS(OFF) color(TURQUOISE)
)BODY EXPAND(||)
%-|-|- IRMF Dialogue User General Information -|-|-
%COMMAND ===>_ZCMD                                                             +
+
+ This information is needed to create information in some JCL
+
\  First         %===><Z                                                       +
\  Middle Init.  %===><Z+                                                      +
\  Last          %===><Z                                                       +
+
+ *You only need to enter Primary Email below if your email is not:
+      First.M.Last@xxx.com
+
\  Primary E-Mail%===><Z                                       +@xxx.com       +
+
+
\ Default Endevor Environment for testing%==><Z   ~  (DEVS/DEVL/etc)
+
+
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 72
Location: USA

PostPosted: Thu Feb 10, 2022 7:30 am
Reply with quote

Yes, Pedro - that is exactly what I ended up doing today.

I looked at some IBM ISPF panels - like the Settings panel. If you set up some swap panels, with a swap bar, and display the Setting panel in a screen other than the first swap screen, then type a character in the last character of the last field of the Settings panel - you will see the cursor jump to position 1 of the last line.

If you have set up a swap bar, this is the place where when you hit enter, you swap to screen 1.

but the Racf - change profile panel does not do that. so I compared the difference. and, the cursor did NOT jump to the swap screen 1 on the swap bar.

so then I looked at the RACF panel, and it did not have SKIP in the attributes.

so, I changed that... and it worked the way I wanted it to.

Had me going for a while. Because I would type that last character and hit enter right after thinking that it was the enter that swapped the panel. I think when IBM wrote the ATTR logic, they probably had just one screen.

Thanks everyone for your help.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Feb 10, 2022 11:06 pm
Reply with quote

The ISPF options panel also has a 'tab to action bar' setting, which may also affect the swapbar. I recall I had that setting turned off.

In a split screen situation where the last line is not shown may result in the same situation you are experiencing now.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 72
Location: USA

PostPosted: Sun Feb 13, 2022 12:28 am
Reply with quote

I will try that next week.

I'm having a problem with the ispf option 7 dialog test breaking for SELECT, but not breaking for anything after (like VGET, VPUT, etc). reading up on whether selecting another application makes the trace drop. I haven't used this in so many years.. so kind of rusty on it. so.. trying to get familiar with the current dialog trace.

but thanks. I will try that.
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 question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts JCL sort card for file creation condi... DFSORT/ICETOOL 4
No new posts VSAM KSDS CREATION AND LOAD WITH RAND... JCL & VSAM 1
No new posts DataSet member creation failed with B... Java & MQSeries 15
No new posts Panel variable model line TSO/ISPF 3
Search our Forums:

Back to Top