MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cobol Declaration problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
sudoku
Beginner


Joined: 14 Aug 2006
Posts: 10
Topics: 4

PostPosted: Sun Sep 24, 2006 2:14 am    Post subject: Cobol Declaration problem Reply with quote

Hi,

I have a problem with cobol declaration for the following:

For a 6 digit field, Positive values in format 999.99 negative values in format -99.99, zero in format 000.00

Any suggestions are welcome!

Thanks,
Sudoku
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Sep 25, 2006 9:09 am    Post subject: Reply with quote

Quote:

For a 6 digit field, Positive values in format 999.99 negative values in format -99.99, zero in format 000.00


Sudoku,

what happens if your input is less than or equal to -100.00 ? How are you planning to store the integer part in 2 digits as the leading byte is taken by the sign.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sudoku
Beginner


Joined: 14 Aug 2006
Posts: 10
Topics: 4

PostPosted: Mon Sep 25, 2006 3:45 pm    Post subject: Reply with quote

Kolusu,

We will never have -100.00. The value will always be between 999.99 and -99.99
One option I am thinking of is to use redefined structures and do a -ve check.

Eg: 05 A PIC 9(03).99
05 B REDEFINES A PIC -9(02).99

Any suggestions from your side!

Thanks,
Sudoku
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group