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
 

 

ISPF Panel - Problem in IF & VER statement combination

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

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Sat Jul 24, 2010 7:58 am    Post subject: ISPF Panel - Problem in IF & VER statement combination
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: 1013
Location: India

PostPosted: Sat Jul 24, 2010 7:18 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Jul 24, 2010 8:11 pm    Post subject:
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    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 ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 2 Tue Jul 25, 2017 1:20 pm
No new posts Trace in CLIST PANEL cvnlynn CLIST & REXX 1 Thu Jun 22, 2017 11:06 pm
No new posts SCLM -- not installed -- panel ISRNOSLM dmitchell1105 IBM Tools 3 Fri Jun 09, 2017 10:41 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm


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