Page 1 of 1

Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 1:04 pm
by gauravkb33
Is it possible to perform arithmetic operations on data of type 345,456,333.78 ? If yes what is the process of declaring such data types ?

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 1:17 pm
by BillyBoyo
Not possible directly. Look at INTRINSIC FUNCTION NUMVAL in the manual. It can convert that to a format you can use for calculation. Be aware, if you give NUMVAL bad data, it will abend.

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 5:48 pm
by gauravkb33
BillyBoyo wrote:Not possible directly. Look at INTRINSIC FUNCTION NUMVAL in the manual. It can convert that to a format you can use for calculation. Be aware, if you give NUMVAL bad data, it will abend.


Thanks for the reply. Helped a lot. :)

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 6:02 pm
by BillyBoyo
Glad to hear it.

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 6:03 pm
by Robert Sample
Terminology is critical in IT, where similar terms may mean very different things. And "345,456,333.78" is NOT a data type -- it is a data value. The COBOL variable that contains this value is a numeric edited variable -- so "numeric edited" is a data type. COBOL variables can be alphabetic, alphanumeric, numeric, numeric edited, pointers, conditionals, groups, and so forth -- you would do well to learn the terminology now and use the correct terms to prevent confusion in the future.

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 8:19 pm
by gauravkb33
Robert Sample wrote:Terminology is critical in IT, where similar terms may mean very different things. And "345,456,333.78" is NOT a data type -- it is a data value. The COBOL variable that contains this value is a numeric edited variable -- so "numeric edited" is a data type. COBOL variables can be alphabetic, alphanumeric, numeric, numeric edited, pointers, conditionals, groups, and so forth -- you would do well to learn the terminology now and use the correct terms to prevent confusion in the future.

I think there is difference between Data of Type 345,455... and Data type. So what I write seems to be correct only. Correct me if I am wrong.

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 8:25 pm
by NicC
Data in the format of... would have been better. Type is not really the correct English word here when you are describing the actual data i.e. 345,543,123,99. As Robert pointed out 'data type' in IT means the generic format of the data e.g alpha, alpha numeric, edited numeric (or numeric edited) etc. It really is a bit of a semantic issue but 'data type' is a recognised IT term so best to try and avoid similar phrases such as 'data of type' which should really be followed by a datatype eg. data of type alphabetic.

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 9:19 pm
by dick scherrer
Hello,

I think there is difference between Data of Type 345,455... and Data type. So what I write seems to be correct only. Correct me if I am wrong.
Yes, you are wrong. . .

It is important to use the "standard" termnology and not make up terminology that you think will work. You will find yourself quite frustrated when people misunderstand you.

Re: Data oftype 345,456,333.78

PostPosted: Fri Jun 08, 2012 9:24 pm
by Robert Sample
A standard definition:
In certain technical fields (especially computer programming and statistics), a data type is a classification identifying one of various types of data, such as real-valued, integer or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of that type can be stored.
Using this definition, what you provided in your original post is NOT a "data type" at all. As Dick said, you are wrong. If you wish to continue in your wrongness, do not do so here -- we prefer standard terminology as much as possible, since debugging issues becomes much easier when everyone refers to the same things in the same way.