View previous topic :: View next topic
|
Author |
Message |
seerajen Currently Banned New User
Joined: 05 Aug 2008 Posts: 10 Location: bangalore
|
|
|
|
hello All,
my code is getting abended when iam trying to verify a comp-3 variable.
i have declare a varible like
Code: |
01 cm-test pic S9(6)v9(4).
01 abc pic 99.
|
and the code is
Code: |
Evaluate True
when cm-test = zeroes
move 10 to abc
when other
move 20 to abc
end-evaluate. |
but my code is abending at Evaluate, is that the conditional statement with comp-3 variable is valid.
regards,
seenu. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Quote: |
01 cm-test pic S9(6)v9(4). |
Is this COMP-3 field?
Quote: |
but my code is abending at Evaluate |
Please post the error code and message. |
|
Back to top |
|
|
seerajen Currently Banned New User
Joined: 05 Aug 2008 Posts: 10 Location: bangalore
|
|
|
|
sorry for the mistake happend....
ya u r right........its a comp-3 variable the declaration is as:
01 cm-test pic S9(6)v9(4) comp-3.
thanks,
seenu |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
You should first test cm-test for numeric-ness...
Would "when cm-test numeric also cm-test = zeroes" work? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I can't remember for sure,
but I believe you can not rely on the resolution order of an 'ALSO' in a WHEN. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Does cm-test contain a value or initialized? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
As alluded to, I'd put the EVALUATE inside an IF statement that tests for NUMERIC. |
|
Back to top |
|
|
|