Can we move a value of 9(2)v99 COMP to 9(2).99?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Disha Shetty
Registered Member
Posts: 20
Joined: Sat Aug 17, 2013 4:54 pm

Can we move a value of 9(2)v99 COMP to 9(2).99?

Post by Disha Shetty »

Hi,

Can we move a value of 9(2)v99 COMP to 9(2).99? I think I know the answer an the answer is yes,we can move but why it is allowed? As one is implied decimal point while other is actual decimal, so why there is no complain from cobol?
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Can we move a value of 9(2)v99 COMP to 9(2).99?

Post by zprogrammer »

Suggest you to read Enterprise COBOL for z/OS 4.1.0>Programming Guide>Part 1: Coding your program>Working with numbers and arithmetic>Displaying numeric data

check this link

http://www-01.ibm.com/support/knowledge ... pari06.htm

Hope it answers your question
zprogrammer
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Can we move a value of 9(2)v99 COMP to 9(2).99?

Post by William Collins »

How else would you ever get a decimal-point to appear, if you could never source it from an implied decimal-point?
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”