Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error in fetching the details from PANEL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 52
Location: Chennai

PostPosted: Mon Nov 18, 2013 1:31 pm    Post subject: Error in fetching the details from PANEL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Nov 18, 2013 2:18 pm    Post subject: Reply to: Error is fetching the details from PANEL
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: 52
Location: Chennai

PostPosted: Mon Nov 18, 2013 3:30 pm    Post subject: Reply to: Error is fetching the details from PANEL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Nov 18, 2013 3:43 pm    Post subject: Reply to: Error is fetching the details from PANEL
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
http://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
http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html

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

Senior Member


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

PostPosted: Tue Nov 19, 2013 12:11 am    Post subject: Reply to: Error in fetching the details from PANEL
Reply with quote

Ramsee, your post shows that error message ISPP241 is displayed. You can use LOOKAT to find the message explanation: See http://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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Nov 20, 2013 2:47 pm    Post subject: Reply to: Error in fetching the details from PANEL
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: 52
Location: Chennai

PostPosted: Wed Nov 20, 2013 3:44 pm    Post subject: Reply to: Error in fetching the details from PANEL
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    Post subject:
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: 1715
Location: UK

PostPosted: Wed Nov 20, 2013 4:20 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Nov 20, 2013 4:21 pm    Post subject: Reply to: Error in fetching the details from PANEL
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us