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

Calling the Panels and Clists


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

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Tue Aug 26, 2014 5:41 pm
Reply with quote

Hi,

I need to call a panel and each option in panel will call few other panels/clist how do i achive this?

EX: my input panel looks
1 AXXXXXXX
2 FAMILY C
3 INSURANCE SCREENS
4 A/R SCREENS
5 DSD
am just displaying 5 there are 80 options and each option will again ahve say 10 option and each 10 will have 5 to 9 options.

if the user gives option1 all the option under 1 should be displayed in another screen. how can we do that
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Aug 26, 2014 6:37 pm
Reply with quote

1. In your rexx program, use Address ISPEXEC "SELECT PANEL(mypanel)" to display the menu panel.
2. in the body of your panel, list your options.
3. In the )PROC section of your panel, use the TRANS function to translate the numbered choice to the panel name of the next panel based on the user's selection.
4. use the &ZSEL variable to call the next panel.

See the source for panel ISR@PRIM for an example.
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 77
Location: chennai

PostPosted: Tue Aug 26, 2014 6:59 pm
Reply with quote

i have given like
/*REXX*/
PANEL = "ISR@USR0"

ADDRESS ISPEXEC
"ISPEXEC LIBDEF ISPPLIB DATASET ID('XXXX.REXX.PANELS')"
"DISPLAY PANEL ("PANEL")"
SAY 'ZCMD' ZCMD

PANELS:
)INIT
.HELP = TUSR00
IF (&MSG ¬= ' ')
.MSG = &MSG
)PROC
&MSG = ' '
.MSG = ' '
&ZSEL = TRANS(TRUNC (&ZCMD,'.')
1,'PANEL(AXXVP001) '
' ',' '
*,'?' )
&ZTRAIL = .TRAIL
)END

still it does not throw the second panel when option 1 is given
Back to top
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Tue Aug 26, 2014 7:14 pm
Reply with quote

Hi Vidyaa,

Please find the below Sinppets as it worked for me.
ZCMD and ZSEL didnt work in my shop as well so i followed a work around.
Kindly let me know is there any other way that will not use ZCMD , ZSEL to display panel and navigate to screens.
Code:

/* REXX */   -- Main Program Call --> EX Member calling the REXX and PANEL PGM                                                   
"PROFILE NOPREFIX"                                               
"ISPEXEC LIBDEF ISPPLIB DATASET ID('USER.LIB.PANEL.REXX')"   --> Panel LIB
"ISPEXEC LIBDEF ISPSLIB DATASET ID('USER.LIB.SOURCE.REXX')"  --> SOURCE LIB REXX Processing COde is present
"ISPEXEC ADDPOP"                                                 
"ISPEXEC DISPLAY PANEL(MAINPANL)"    --> DESIGN PGM present in USER.LIB.PANEL.REXX                           
"ISPEXEC REMPOP"                                                 
ADDRESS ISPEXEC "VPUT (MAININPT) SHARED"                             
  SELECT;                                                       
     WHEN MAININPT = '1' THEN                                       
       DO                                                       
         "ISPEXEC DISPLAY PANEL(AXXXXXX1)"                       
          ADDRESS ISPEXEC "VPUT (AXINPUT) SHARED"               
          IF PNDTETYP = '1' THEN                                 
             DO                                                 
               "ISPEXEC DISPLAY PANEL(AXXXXXX2)"   
      CALL AXXXXPGM --> REXX PGM --> USER.LIB.SOURCE.REXX
      END
.
.
.
.
.
.
.
.
.
.
.
     IF PNDTETYP = '80' THEN                                 
             DO                                                 
               "ISPEXEC DISPLAY PANEL(AXXXXXX80)"   
      CALL AXXXXPGM --> REXX PGM
         END
        END                                   
        OTHERWISE                             
       SAY "THANK YOU"
   END                                           
EXIT                                                            


Panel Design MAINPANL --> USER.LIB.PANEL.REXX
)ATTR                                                     
  %  TYPE(TEXT)  INTENS(HIGH) COLOR(TURQ)                 
  @  TYPE(TEXT)  INTENS(HIGH) COLOR(GREEN) SKIP(ON)       
  +  TYPE(TEXT)  INTENS(LOW)  SKIP(ON) COLOR(RED)         
  $  TYPE(TEXT)  INTENS(HIGH) COLOR(RED)                 
  _  TYPE(INPUT) INTENS(HIGH) JUST(LEFT) COLOR(TURQ)     
)BODY EXPAND(\\)                                         
+                                                         
+                                                         
%\-\+      @INPUT LINE 1           %\-\     
+                                                         
+                                                         
+      @ENTER CHOICE OF THE INPUT %===>_CHOICE       
+                                                         
+                                                         
+                  @1.INP1                                                             
+                  @2.INP2
+         ..
+         ..   
+         ..   
+                  @80.INP80
+
+PRESS%PF3+TO RETURN.           
+                               
+                               
)INIT                           
  &CHOICE  = ' '               
)REINIT                         
 REFRESH(*)                     
)PROC                           
    VPUT(CHOICE) SHARED         
    VER(&CHOICE,NB,RANGE,1,80)   
)END                           

AXXXXPGM :
/*REXX*/ --> Argument passed from the PANEL to the PGM
ARG RANGE   
                                               
TRACE N                                         
-- Program libraries are included here         
                                               
FILEDSN   = 'USER.LIB.SOURCE.REXX'         
SKELIB    = 'USER.LIB.SKELE.REXX'   

Your Logic needs to be coded


                 


Hope this helps and let me know if you have any issues.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 26, 2014 8:20 pm
Reply with quote

I suggest that you follow Pedro's advice and that you take the time to read the ISPF manuals for MENU panels which is the correct way to go in this situation and is exactly what Pedro has suggested.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Aug 26, 2014 9:10 pm
Reply with quote

Repeating:
Quote:
1. In your rexx program, use Address ISPEXEC "SELECT PANEL(mypanel)" to display the menu panel.

The rexx code you posted does not do that.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Aug 27, 2014 1:00 pm
Reply with quote

vidyaa wrote:
Hi,

I need to call a panel and each option in panel will call few other panels/clist how do i achive this?

EX: my input panel looks
1 AXXXXXXX
2 FAMILY C
3 INSURANCE SCREENS
4 A/R SCREENS
5 DSD
am just displaying 5 there are 80 options and each option will again ahve say 10 option and each 10 will have 5 to 9 options.

You're building a system that will be completely unmaintainable!
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 27, 2014 2:02 pm
Reply with quote

The only way to handle such amount of options is to use ISPF tables and TBDISPL.

If you do not want to have hundreds of panels, use only one.
Have the main options in an external file. Create an ISPF table (TBCREATE), read the file (EXECIO) and load the table (TBADD) then display it (TBDISPL).
The main options file could contain 3 fields: the option number, the description and a name (which points to the secondary options).
When the user chooses an option, get the corresponding name, create another ISPF table (TBCREATE), read the secondary file (EXECIO), load the table (TBADD) and display it (TBDISPL).
Repeat for the third submenu.

Use different tables so when you go up one level the previous menu can be easily redisplayed.

You will have to decide how you want to keep the menus content (different members, one big PS file, a DB2 table)
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Sep 03, 2014 6:11 pm
Reply with quote

I'd like to know what happened here...
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 Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts calling a JCl inside a JCL JCL & VSAM 3
No new posts Calling IEHPROGM from REXX CLIST & REXX 7
Search our Forums:

Back to Top