COBOL Error

Disclaimer: I'm taking a class.

I'm trying to find an error in this COBOL code; this file is related to the items at http://www.experts-exchange.com/Programming/Algorithms/Q_26637173.html.

Do you have any hints?
JCW2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
Can you be any more specific, what is or isn't happening that you are trying to track down?  Or are you getting a syntax error of some sort?  What have you determined so far?

~bp
Bill PrewIT / Software Engineering ConsultantCommented:
Or are you trying to answer the assignment question of:

For example the first row of output program CBL1008 is for Anchorage
Alaska and the four quarters reported are:
48,710,830-    950,870,160-    427,544,050+    175,897,950-

The above totals to 747,934,890-

However, CBL2008 reported total for Anchorage Alaska is 47,934,890-

Correct CBL2008 program to accurately total the four quarters for
each city/county.
If that is the problem to be solved, I do see why that would be happening.  But honestly, I don't think EE is the place to get direct answers to class assignments, so I;m not going to just post that, it wouldn't be fair to you.

I would suggest you walk through the logic on 2008 and look for any potential problems in the way it derives the totals.

~bp
JCW2Author Commented:
Okay, I'm looking at the picture clauses. I'm not familiar with that structure, so can you explain things such that I understand how they affect the program, and the clauses themselves?
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

Bill PrewIT / Software Engineering ConsultantCommented:
What class are you taking where they haven't taught you about picture clauses, but are debugging COBOL programs?  And don't you have a text or reference on the language.

~bp
JCW2Author Commented:
I'm in a mainframing course. I have a reference, but do you have anything at all to say about picture clauses? I'm a little confused.
Bill PrewIT / Software Engineering ConsultantCommented:
So, do you understand what the following means at all?  (trying to figure out how to help you without giving away the answer...)

PIC S9(8) COMP-3

~bp
JCW2Author Commented:
Signed number with 8 digits
JCW2Author Commented:
(packed decimal)
Bill PrewIT / Software Engineering ConsultantCommented:
So, if you manually add up the quarter totals that you are trying to compute a year total from, what number do you come up with and how does it compare to that picture clause on the totaling variable?

~bp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JCW2Author Commented:
Thank you for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Mainframe Languages

From novice to tech pro — start learning today.