View previous topic :: View next topic |
Author |
Message |
maverick05 Beginner

Joined: 15 May 2005 Posts: 72 Topics: 24
|
Posted: Wed Jan 27, 2010 1:22 pm Post subject: Compiler option to bypass data type check? |
|
|
Hi,
I have a variable X declared as 9(02). and it has 88 variable Y value 02.
I'm getting ASRA exception at the following statement.
IF Y( Here X is stored as space/any garbage value),
.......
End-if.
I'm not getting ASRA exception in another mainframe/CICS environment
for the same values and same code.
I believe their is a compiler option which ignores this data type mismatch
comparision. Here it only checks If Y = 02 is TRUE or FALSE,it doesn't compare data types with this option.
Any idea on this is appreciated.
Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
maverick05 Beginner

Joined: 15 May 2005 Posts: 72 Topics: 24
|
Posted: Wed Jan 27, 2010 3:32 pm Post subject: |
|
|
Thanks Kolusu. I also suspected the same
NUMPROC(NOPFD) is the override option and NUMPROC(MIG) is the defau |
|
Back to top |
|
 |
haatvedt Beginner
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
|
Posted: Sat Jan 30, 2010 12:58 am Post subject: |
|
|
Maverick05,
I'm not sure that the NUMPROC compiler option would save you if your variable contained X'FFFF'. If I remember correctly the NUMPROC(NOPFD) option is used to do "sign" cleanup if the sign portion of the field is incorrect.
It would be an easy thing to test with a simple batch program. _________________ Chuck Haatvedt
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters) |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Thu Feb 04, 2010 8:55 pm Post subject: |
|
|
Hi Mav,
Why not change the pic 99 to pic xx? You won't even have to put quotes around the 02 if your compiler is Enterprise COBOL.
I always use X if I don't plan on using math on the field, to avoid the problem you're facing. _________________ Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering |
|
Back to top |
|
 |
|
|