Hi Anu,
The reason you are not getting data exception is because both the variables data1 and data2 are of alphanumeric data type. (both being group items). If you define data1 as a numeric item and redefine the same by alphanumeric (only 2 variables instead of 4) then the same run would throw a data exception.
i think numeric field can contain spaces, but if u define the numeric field field as comp then u will get data exception while executing the program, at the time of compilation it won't show any error. and if the numeric field is defined just as 9(tt)...tt is any numeric value then even at the execution time it won't give abend.Just check this link...probably it will help
sribks2005-- Thats a very good try. But i dont know why it is giving data exception over there. Try to keep initialize statement instead of moving spaces to data2. Let us see what happens..
hi Anu,
I tried with initialize statement also.
=================================
initialize data2.
if data4 = spaces
display "numeric item contained spaces"
end-if.
display "alphanumeric data2=" data2.
==================================
but again it ran succesfully with data2 holding spaces.