IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem in edited pictures


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sonalig

New User


Joined: 22 Aug 2005
Posts: 7
Location: India

PostPosted: Fri Sep 16, 2005 10:26 am
Reply with quote

Dear Friends,
I faced a small problem in my code in COBOL.
I read a variable (PIC 9(03)V99) from a file record. In file, the value for this variable is 00450. Now, i wish to print this value in a report with a decimal point shown.

So, I moved this variable to another display variable with declaration
9(03).99

Now, I was expecting that, in the report, it should show the value as 004.50

But after execution, the value was getting printed as 000.04

If I change my variable declaration (in the copybook of the input file) as
9(05), instead of 9(03)V99, then the value is getting correctly displayed as 004.50

Could anybody please expalin why this is happening? As per my knowledge, moving of 9(03)V99 to 9(03).99 should work straight away and should diaplay the correct output. I dont understand why it is failing in this particular case.

thanks,
Sonali.
Back to top
View user's profile Send private message
Ravi gaur

New User


Joined: 12 Jul 2005
Posts: 38

PostPosted: Mon Sep 19, 2005 12:09 pm
Reply with quote

Use pic 9(3). 9(2)


believe would be eridicate with problem..


Let me know if u have any query.
Back to top
View user's profile Send private message
ritakaur

New User


Joined: 19 Sep 2005
Posts: 13
Location: Belgaum

PostPosted: Mon Sep 19, 2005 1:50 pm
Reply with quote

yes.Using pic 9(3). 9(2) will be correct.

bye
rita
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top