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

Error in fetching the details from PANEL


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

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Mon Nov 18, 2013 1:31 pm
Reply with quote

Hi All,

Good day and Warm greetings!!

I am learning how to Code PANEL via REXX and now i am trying to FETCH information from PANEL, but the information is not fetched properly, my issue is as follows.
1. I have designed a MAIN PANEL with one input option

Enter your Option ==>_
a. 1==>Sub-Panel1
b. 2==>Sub-Panel2
c. 3==>Sub-Panel3

If the USER enters 1 as input user will be routed to Sub-Panel1 / 2--> Sub-Panel2 / 3 --> Sub-Panel3

following design is done for the same.
Code:

)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(\\)                                         
+      @ENTER YOUR OPTION%===>_ZCMD   
+                                                           
+                                                           
+                  @1.ABC (SUB-PANEL1)           
+                                                           
+                  @2.BCD(SUB-PANEL2)           
+                                                           
+                  @3.CDE(SUB-PANEL3)               
+                                                           
+                                                           
+PRESS%PF3+TO RETURN.         
)INIT                               
  .ZVARS= '(INPUT)'                 
/)REINIT                             
)PROC                               
    &ZSEL=TRANS(TRUNC(&INPUT,'.')   
               1,'PANEL(sub-panel1)'   
               2,'PANEL(sub-panel2)' 
               3,'PANEL(sub-panel3)'
               ' ',' '               
               *,'?' )               
)END                                 
                 


I am using the REXX program to execute the above design is as follows
Code:

"PROFILE NOPREFIX"                                               
"ISPEXEC LIBDEF ISPPLIB DATASET ID('USER.TEST.SOURCE.PANEL')"
"ISPEXEC LIBDEF ISPSLIB DATASET ID('USER.TEST.SOURCE')"       
"ISPEXEC ADDPOP"                                                 
"ISPEXEC DISPLAY PANEL(PANEL1)"                                 
"ISPEXEC DISPLAY PANEL(SUBPL1)"                               
"ISPEXEC DISPLAY PANEL(SUBPL2)"                               
"ISPEXEC DISPLAY PANEL(SUBPL3)" 
"ISPEXEC REMPOP"                                                 
ARG INPUT       
                                                 


I am getting the following error while trying to execute the Main Panel

Code:

 ISPP241                                                                   
                                                                           
 Panel 'PANEL1' error                                                     
 Number of .ZVARS field names does not equal number of "Z" in/out fields. 
                                                                       
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
 Current dialog statement:                                                 
 DISPLAY PANEL(PANEL1)                                                     


Kindly help me to identify the mistake that i have committed above.

Thanks a lot for the time.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Mon Nov 18, 2013 2:18 pm
Reply with quote

seems to me that the message is pretty self explaining

in a panel You code a field as Z when the field size is not wide enough to contain the real field/variable name

very seldom in a selection panel You will need Z fields
( and certainly not at the beginner's level )

in this case just get rid of the ZVARS stuff
Back to top
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Mon Nov 18, 2013 3:30 pm
Reply with quote

Hi Enrico,

Could you please suggest me what is the best way to get the INPUT from the Panel and to the pass the INPUT to the REXX program so that i can try and make it work for my requirment.

Thanks a ton for the time and help.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Mon Nov 18, 2013 3:43 pm
Reply with quote

start by reading and meditating on the ISPF manuals ...
to understand the difference between
DISPLAY PANEL ...
and
SELECT PANEL ...

what You posted is a SELECTION panel
where ISPF takes care of the navigation

not the latest ones but more than enough to get You started
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/ISPZPM70

start from here if on the other side You want to look at the ISPF manuals for Your level of zOS
www-03.ibm.com/systems/z/os/zos/bkserv/index.html

see here for a FULL working example
www.ibmmainframes.com/viewtopic.php?t=60794&highlight=display+panel+test
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Nov 19, 2013 12:11 am
Reply with quote

Ramsee, your post shows that error message ISPP241 is displayed. You can use LOOKAT to find the message explanation: See www-03.ibm.com/systems/z/os/zos/bkserv/lookat/

ISPF also has a messages and codes manual which will have the explanation for message ISPP241. See the link that Enrico provided.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Wed Nov 20, 2013 1:31 pm
Reply with quote

Ramsee, to display your main panel without errors, all you need to do is delete everything in INIT, REINIT & PROC section(including headers), then update _ZCMD to _INPUT.
Later in REXX, you can use IF condition statement with INPUT variable to display your sub-panels. (Ex: if Input = 1 then ....)
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Nov 20, 2013 2:47 pm
Reply with quote

any reason to suggest to the TS to implement his own panel navigation infrastructure
when ISPF will certainly do it in a better way ???
Back to top
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Wed Nov 20, 2013 3:44 pm
Reply with quote

Hi MFKID,

Thanks for your kind suggesstion on my query!!

I have used the below logic for my requirement.

PANEL DESIGN:
Code:

)INIT                     
  &INPT  = ' '             
)REINIT                   
 REFRESH(*)               
)PROC                     
    VPUT(INPT) SHARED     
    VER(&INPT,NB,RANGE,1,3)



REXX Code :
Code:

ADDRESS ISPEXEC "VPUT (INPT) SHARED"                 
  IF INPT = '1' THEN                                 
     DO                                               
       "ISPEXEC DISPLAY PANEL(SUBPAN1)"                                           
     END                                             
  IF INPT = '2' THEN                                 
     DO                                               
       "ISPEXEC DISPLAY PANEL(SUBPAN2)"             
     END                                             
  IF INPT = '3' THEN                                 
     DO                                               
       "ISPEXEC DISPLAY PANEL(SUBPAN3)"     
     END
EXIT   
       


Above code did exactly what i required with the PANELS.

Please let me know if there is any other way to acheive the above requirement as i was not able to succeed with ZVARS.

Thanks a ton for the Time and Help once again!!
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Wed Nov 20, 2013 4:09 pm
Reply with quote

Great.. I guess you do not need to code "VPUT(INPT) SHARED" in your panel program or REXX. Once you define the input variable (_INPT) in you panel, the variable will be directly accessible from rexx.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Nov 20, 2013 4:20 pm
Reply with quote

First of all, that can all be done without rexx code as Enrico has said. ISPF can handle it all - look at the code for ISP@PRIM or look in the manual. The only Z variable required is ZCMD.
Second: what is with all those IFs? Why not use SELECT or IF/THEN/ELSE? But preferably no code at all except to display your selection panel.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Nov 20, 2013 4:21 pm
Reply with quote

Quote:
Please let me know if there is any other way to acheive the above requirement as i was not able to succeed with ZVARS.

the other way is the PROPER way ...
let ISPF handle the navigation
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Wed Nov 20, 2013 4:34 pm
Reply with quote

Ramsee, ibmmainframeforum.com might be a better place to post queries related to basic/starter level questions on panel/rexx designs.
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 Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Error to invoke MPP program through B... IMS DB/DC 3
No new posts Preserve changes to ISPF Panel Variables TSO/ISPF 1
No new posts PKZIP error ZPFM121E and ZPCE009E JCL & VSAM 6
Search our Forums:

Back to Top