View previous topic :: View next topic
|
Author |
Message |
vidyaa
New User
Joined: 02 May 2008 Posts: 77 Location: chennai
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
vidyaa
New User
Joined: 02 May 2008 Posts: 77 Location: chennai
|
|
|
|
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 |
|
|
Ramsee
New User
Joined: 06 Jan 2011 Posts: 53 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
I'd like to know what happened here... |
|
Back to top |
|
|
|