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

ISPF Panel - Problem in IF & VER statement combination


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

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Sat Jul 24, 2010 7:58 am
Reply with quote

Hi,

I have designed a panel like below,
Code:
)ATTR DEFAULT(%+_)                                                     
  { TYPE(INPUT) INTENS(LOW) PAD(_) CAPS(OFF)                           
  $ TYPE(INPUT) INTENS(LOW) COLOR(WHITE) CAPS(ON)                       
  ` TYPE(OUTPUT) INTENS(HIGH)                                           
  # TYPE(TEXT) COLOR(WHITE)                                             
  ¬ TYPE(TEXT) COLOR(RED)                                               
  ! TYPE(TEXT) COLOR(YELLOW)                                           
  ~ TYPE(TEXT) COLOR(TURQ)                                             
)BODY EXPAND(//) WIDTH(80)                                             
+-----------------------------------------------------------------------
+ ~CHOOSE#ONE~OF THE OPTIONS                                    +       
+~SELECT $R              ~SPACES AND EXECUTE $CU                   ~LIKE
+1){UTILS +(~CHK, COPY, RBD, REC, QSE, COR, RCHK, RCOPY, RRBD, RREC, RCO
+2){START+DATABASE~({DATABASE~)+SP (*) ACCESS~({ACCES~)+               
+ MSG : $MESSAGE                                                +       
+-----------------------------------------------------------------------
)MODEL                                                                 
)INIT                                                                 
 &R           = '* \ RESTRICTED'                                     
 &CU          = 'COMMANDS \ UTILITIES'                               
 &UTILS       = 'CHOOSE'                                             
 &LCU ='COMMANDS,UTILITIES,UTILITY,C,U,COM,UTL'                       
 &LUT ='CHK,COPY,RBD,REC,QSE,COR,RCHK,RCOPY,RRBD,RREC,RCOR'           
)PROC                                                                 
  VER (&R,LIST,'*','ALL','RESTRICTED','RESTRICT','R','RES')           
  VER(&CU,NB,LISTV,&LCU)                                             
IF(VER(&CU,NB,LISTV,&LCU))                       
     *REXX(CU)                                   
        IF(SUBSTR(CU,1,1) ='U') THEN             
        DO                                       
           SAY 'IAM HERE'                         
           FU=0                                   
        END                                       
        ELSE FU=1                                 
        RETURN                                   
      *ENDREXX                                   
IF(&FU = 0 )                                     
   VER(&UTILS,NB,LISTV,&LUT)                     
)END                                             

When i execute i get the below output,
Code:
------------------------------------------------------------------------------
  CHOOSE ONE OF THE OPTIONS                                                   
 SELECT  * \ RESTRICTED  SPACES AND EXECUTE  COMMANDS \ UTILITIES  LIKE       
1) CHOOSE ( CHK, COPY, RBD, REC, QSE, COR, RCHK, RCOPY, RRBD, RREC, RCOR )   
2) _____ DATABASE ( ________ ) SP (*) ACCESS ( _____ )                       
 MSG :                                                                       
------------------------------------------------------------------------------


And when i give the below entry('*' next to select and 'Utility' next to EXECUTE) and press enter,
Code:
------------------------------------------------------------------------------
  CHOOSE ONE OF THE OPTIONS                                                   
 SELECT  *               SPACES AND EXECUTE  Utility               LIKE       
1) CHOOSE ( CHK, COPY, RBD, REC, QSE, COR, RCHK, RCOPY, RRBD, RREC, RCOR )   
2) _____ DATABASE ( ________ ) SP (*) ACCESS ( _____ )                       
 MSG :                                                                       
------------------------------------------------------------------------------

iam getting the message 'IAM HERE' and then panel closes, so i think the last condition & VER statement is not getting executed.
Code:
IF(&FU = 0 )                                     
   VER(&UTILS,NB,LISTV,&LUT)                     

What i expected is, until i enter the correct value for &utils variable, the panel should stay open.

I don't know where i making the mistake or i am misunderstanding something here...

Please let me know so that i could proceed.....

Thank You,
Sushanth
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Sat Jul 24, 2010 7:18 pm
Reply with quote

Hi,

Resolved it by using

Code:
*REXX(CU,FU)           
   CALL ISPPRXVP 'I'   
.
.
.
.
.
    CALL ISPPRXVP 'T'     
RETURN                     
*ENDREXX                   

Thank You,
Sushanth Bobby
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sat Jul 24, 2010 8:11 pm
Reply with quote

Well done on resolving the problem and good for you because you also took the time and bother to post the resolution.
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top