View previous topic :: View next topic |
Author |
Message |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Fri Oct 28, 2011 2:04 pm Post subject: ISPF if statement |
|
|
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 |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Fri Oct 28, 2011 2:33 pm Post subject: |
|
|
Possibly because the value '99999.99' is greater than '100000', not less. _________________ All the best,
di |
|
Back to top |
|
 |
asr2 Beginner
Joined: 25 Jun 2011 Posts: 26 Topics: 4 Location: Germany
|
Posted: Tue Nov 01, 2011 4:29 am Post subject: |
|
|
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 |
|
 |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Tue Nov 01, 2011 10:47 am Post subject: |
|
|
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 |
|
 |
|
|