Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Operand Error

Status
Not open for further replies.

mcobolahan

Technical User
Feb 7, 2001
2
0
0
US
I'm back...

I have the following code, and receive "Operand must be a numberic data-name or a numeric literal" when compiled.

MOVE ER-PAY-RATE TO AC-GROSS-PAY
MULTIPLY ER-HOURS-W0RKED BY AC-GROSS-PAY
MOVE AC-GROSS-PAY TO EL-GROSS-PAY.

...and

MOVE ER-YTD TO AC-UPDATED-YTD
ADD AC-GROSS-PAY TO AC-UPDATED-YTD
MOVE AC-UPDATED-YTD TO EL-UPDATED-YTD.

...while I'm at it...

YTD must = zero suppression leading dollar digits, print decimal point, insert comma.
What PIC clause do I use/placed in input or output?
 
To implement this in COBOL should will basically want to have three sets of data items, althought not every data item will be in every set.

The first set of items is the input fields. These are the fields that already exist in the input file and they must be defined exactly as they look there, which usually means with an S for the sign, if applicable, and a V for the implied decimal points.

The next set of items are the working fields and accumulators. These are fields which hold the results of intermediate calculations and counters. The should be defined with an S for the sign, if applicable, and a V for the implied decimal points.

The next set of items are the print line fields. These are fields which will actually print out on the report and they should contain editting characters suitable for the humans who will read the report, like zero suppression, dollar signs, commas, and real decimal points, such as $$$,$$9.99, or whatever.

Hope this gets you started down the right path Betty Scherber
Brainbench MVP for COBOL II
 
mcobolahan,

allthough BettyScherber is completely correct, it might help if you included the working-storage definitions of the identifiers you mentioned in your initial post; that way, something specific might be said about your problem.

Good luck !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top