Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Tue Mar 20, 2012 4:12 pm Post subject:
probably not, and then again, maybe so.
1st. would not do a direct move. refer to cobol conversion move in manual. (links at top of this page)
2nd. the ARITH cobol compiler option has a lot of influence. if you potentially have 23 significant digits, ARITH(31) is the only way you are going to make it.
3rd. if you used comp-5 instead, you would have a better chance.
4th. get into the habit of using signed numeric fields.
5th. what values can be contained in the 23 bytes?
6th. look at NUMVAL (again, COBOL manual, link at top of page),
if the values conform to the NUMVAL command prerequisites
7th. even though E-Cobol allows for this kind of stupidity (MOVE X-TYPE to COMP-datatype)
i would never do it.
i would first insure the integrity of the data contained in the x(23) field.
last but not least, this is a 'free' forum,
posters contribute on their own time,
at their own expense,
with their own skill set, that they have developed thru work, reading, testing
and thinking.
posting twice is rude. _________________ Dick Brenholtz
American living in Varel, Germany
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