200 pts.
 AS/400
i have two fields defined in RPGLE PGM one is in O spec as 
O BCENTH Z 
 and one is in D spec as 
D DS 
D TCALC 10 0 
when i done eval Statement 
 EVAL BCENTH = TCALC 
it gives me compiler Error that *RNF7416 30 1002 053200 The types of the right and left hand side do not match in the EVAL operation. and 
*RNF7059 20 1200 072800 Editing is not valid with field BCENTH that is not numeric. Editing is ignored. 
what changes i have to make in my PGM?


Software/Hardware used:
i-series
ASKED: March 9, 2012  9:32 AM
UPDATED: March 17, 2012  1:03 AM

Answer Wiki:
Where is BCENTH defined. If it is in the O spec as you are showing then you are defined it as a timestamp. My guess is you what the Z to be the edit code so it will do a zero supress. If that is the case you need to create a D spec to define DCENTH as a numeric field
Last Wiki Answer Submitted:  March 9, 2012  1:54 pm  by  CharlieBrowne   32,855 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,855 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

O BCENTH Z

It’s impossible to tell what that is without formatting. Is it a timestamp? Or is it a zero-suppress edit code for a field in a printer file?

Tom

 108,055 pts.

 

I don’t remember O specs declaring variables, they just format the output.
So since this field isn’t declare the variable the compilier issues an error and assumes the type char,. which leads to the error you’ve identified.
phil

 44,150 pts.

 

I don’t remember O specs declaring variables, they just format the output.

Although variables are not declared in O-specs, data type can be specified to describe the handling in output. Regardless, the combination of error messages means your description is probably correct.

We’ll see what code gets posted, though it might not be necessary.

Tom

 108,055 pts.