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 

Compiler option to bypass data type check?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
maverick05
Beginner


Joined: 15 May 2005
Posts: 72
Topics: 24

PostPosted: Wed Jan 27, 2010 1:22 pm    Post subject: Compiler option to bypass data type check? Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Wed Jan 27, 2010 2:58 pm    Post subject: Reply with quote

maverick05,

Take a look at NUMPROC compiler option

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
maverick05
Beginner


Joined: 15 May 2005
Posts: 72
Topics: 24

PostPosted: Wed Jan 27, 2010 3:32 pm    Post subject: Reply with quote

Thanks Kolusu. I also suspected the same
NUMPROC(NOPFD) is the override option and NUMPROC(MIG) is the defau
Back to top
View user's profile Send private message
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sat Jan 30, 2010 12:58 am    Post subject: Reply with quote

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
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Thu Feb 04, 2010 8:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming 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