MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ISPF if statement

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Fri Oct 28, 2011 2:04 pm    Post subject: ISPF if statement Reply with quote

I want to limit the value of input field "Fee" (width of 7) on a ISPF panel between 0 and 9999.99
Code:

The attribute for fee is:
  TYPE(INPUT) INTENS(LOW) JUST(RIGHT) COLOR(GREEN)

)PROC
  IF (VER(&FEE,ENUM))
     IF (&FEE < 0 OR &FEE > 9999.99)
       .MSG = ROLL009
  ELSE .MSG = ROLL008

It will not accept negative number but why it accepts a value greater or equal to 10000?
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Fri Oct 28, 2011 2:33 pm    Post subject: Reply with quote

Possibly because the value '99999.99' is greater than '100000', not less.
_________________
All the best,

di
Back to top
View user's profile Send private message
asr2
Beginner


Joined: 25 Jun 2011
Posts: 26
Topics: 4
Location: Germany

PostPosted: Tue Nov 01, 2011 4:29 am    Post subject: Reply with quote

When native ISPF facilities do not suffice, it is now possible to embed REXX statements in ISPF panels (and skeletons). This can often greatly simplify the logic.

Regards

Tony
Back to top
View user's profile Send private message
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Tue Nov 01, 2011 10:47 am    Post subject: Reply with quote

asr2,

The *REXX code does the trick. Thanks. The manual mentioned numeric comparison only works on whole number (character comparison for decimal).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group