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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
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 -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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