MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Panel not displaying

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Dec 21, 2022 2:05 am    Post subject: Panel not displaying Reply with quote

I hope I can include what I believe is all the relevant code.
I have a panel with pull-downs. One of them (option 22, panel MSSQLDDL) is defined as
Code:

PDC DESC('DSNUTILB load/unload statements')                 
        ACTION RUN(ISRROUTE) PARM('SELECT CMD(MSSQLDDL) ')   

The actual panel is defined as
Code:

)ATTR DEFAULT(%+_)                                                     
       %   TYPE(TEXT)  INTENS(HIGH)  COLOR(WHITE)                     
       !   TYPE(TEXT)  COLOR(BLUE)                                     
       +   TYPE(TEXT)  INTENS(LOW)   COLOR(BLUE)                       
       _   TYPE(NEF) CAPS(ON) JUST(LEFT)                               
)BODY WINDOW(55,5)                                                     
!                                                                     
! Load/Unload (L/U)     %===>_Z+                                       
! The following 2 options are only relevant for Load                   
! Offset                %===>_OFF                                     
! Append/Replace (A/R)  %===>_Z+                                       
)INIT                                                                 
.ZVARS = '(LOADUNL,APPREPL)'                                           
&ZSAVTTL = &ZWINTTL                                                   
&ZWINTTL = 'DSNUTILB options'                                         
VGET (LOADUNL,APPREPL,OFFSET) PROFILE                                 
&OFF = &OFFSET                                                         
)REINIT                                                               
)PROC                                                                 
&ZWINTTL = &ZSAVTTL                                                   
&ZSEL = ''                                                             
&OFFSET = &OFF                                                         
VER(&LOADUNL,NONBLANK,LIST,L,U)    /* Only L or U               */     
VER(&APPREPL,LIST,A,R,)   /* Only A or R               */             
IF (&LOADUNL = U)                                                   
  IF (&OFF NE '')                                                   
    /* They chose U AND filled in offset, not allowed */           
    .CURSOR = OFF                                                   
    .MSG = SQL005                                                   
  IF (&APPREPL NE '')                                               
    /* They chose U AND filled in append/replace, not allowed */   
    .CURSOR = APPREPL                                               
    .MSG = SQL005                                                   
IF (&LOADUNL = L)                                                   
  /* Selected L, ensure Offset and Append/Replace filled in */     
  VER(&OFF,NONBLANK,RANGE,1,100)    /* Only between 1 & 100  */     
  VER(&APPREPL,NONBLANK,LIST,A,R,)  /* Only A or R           */     
&OFFSET = &OFF                                                     
&MSPFKEY = 'PF00'                                                   
&MYCURS = .CURSOR                                                   
/* An explanation is required                                  */   
/* On the main panel, they chose the DSNUTILB option which     */   
/* automatically brings them to this panel.                    */   
/* When they press PF3 here, they're taken back to the         */   
/* original panel, but the value in MYCURS is still set to     */   
/* SQLOPT. This in turn means that they need to press enter    */   
/* TWICE to actually get the work done. To avoid this,         */   
/* we deliberately set MYCURS to the current cursor            */   
VPUT (LOADUNL,OFFSET,APPREPL,MYCURS,MSPFKEY) PROFILE               
)END                                                               

and the actual code to drive the panel itself is defined as
Code:

address ISPEXEC                     
"ADDPOP ROW(10) COLUMN(10)"         
"DISPLAY PANEL(MSSQLDDL)"           
"REMPOP"   

(they don't get much simpler than that).

My problem is as follows.
The main panel with all the pull-down options saves the last pull-down option the user chose. When the user reenters the panel, if they simply press enter, then the previous option is run again. For example, start the panel, select the SQL INSERT option and the code is generated. Now exit the panel, start it again and the default generated SQL code if I press enter will be INSERT again (on the basis that I didn't select/change the previous pull-down option used).

Now to my problem.

I select option 22 above and am presented with the MSSQLDDL panel defined above. I enter my values and DSNUTIL JCL is generated.
I now exit the main panel, and restart it.
By default, option 22 is the default option.
However, if I now press Enter, the MSSQLDDL is never shown, so I never have any chance to change from, say, Unload to Load or vice-versa.
Is there some simple parameter I'm missing that forces the panel to be shown?
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Dec 21, 2022 12:59 pm    Post subject: Reply with quote

misi01,

Did you try adding )INIT section to the Panel definition ? Check out this presentation from Share

https://share.confex.com/share/117/webprogram/Handout/Session9764/S9764%20-%20ISPF%20Panels
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Fri Dec 23, 2022 12:18 pm    Post subject: Reply with quote

Thanks for the link, but it gave a 404
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Dec 28, 2022 8:46 am    Post subject: Reply with quote

Okay, here's how I solved it (probably clunky, but if someone has a better idea, then I'd be happy to hear it).
The basic problem is the action bar (AB) only runs the commands associated with the AB option if the user actually opens the relevant AB.
For example, say option 22 for the AB is set to
Code:

PDC DESC('DSNUTILB load/unload statements')                 
        ACTION RUN(ISRROUTE) PARM('SELECT CMD(MSSQLDDL) ') 

then this CMD is never run unless the user opens the AB.
My changes were as follows. In the base panel, I included the following
code
Code:

)INIT                               
.ZVARS = '(TAB,INSERT,SORT)'         
&MYCURS = ''                         
&PANELSH = 0                   <------       
VPUT (PANELSH) PROFILE   <------

In the MSSQLDDL panel, I included the following
Code:

)PROC                 
&PANELSH = 1                  <----- indicate we have shown this panel
VPUT (PANELSH) PROFILE  <-----

Now, in the main Rexx script that drives everything, I included
Code:

address ispexec 'VGET (PANELSH) PROFILE'   

after main panel display, then the following code that analyzes what the user after pressing Enter/PF3
Code:

    when sqlopt = 22 & panelsh = 0 then                             
      do                                                           
        /* Basically, the ORIGINAL option chosen was 22.           
           However, this was from the previous time they ran MSGESQL
           and NOT this time.                                       
           To that end, we want to ensure they are shown the       
           MSSQLDDL panel again so they CAN change their choices */
        rc = MSSQLDDL()                                             
        if rc = 8 then                                             
          do                                                       
            /* They pressed PF3 */                                 
            curfld = 'SYST' ; csrpos = 1                           
            zverb = 'RESHOW'                                       
          end                                                       
        else                                                       
          do                                                       
            rc = process_enter_pressed()     <---- business as usual                           
          end                                                       
      end                                                           

_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group