WHAT IS DECIMAL DATA ERROR IN RPG IV...WHEN WILL IT HAPPENS?

Answer Posted / priya

Decimal data error occurs primarily when numeric field receives invalid values/numbers. The same goes for the case of parameter passing.

When the file is opened by a program and the record containing the invalid data is read, you will not get an error.

But if the field containing the invalid data is read in the program, and some arithematic operation is performed with that value it gives decimal data error.
For eg by being the Factor1 of a MOVEx operation, or either factor in an ADD, SUB, DIV, MULT etc., or on the right-hand side of an EVAL, or if it is involved in a WRITE or UPDATE operation -- then it will be checked, and then the program will fail.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of jdftval in as400?

1183


Hi,Can any body give the code for the below mentioned quetion.?Im trying to get coding in with easily inderstanding.Plese give me the coding for this? 1.How would you achieve this requirement with out using RPG/RPGLE pgm,but by using only CL?Read a database file and display file contents on the screen when enter key pressed the next record should be displayed on screen.When the last record is reached or when F3 key is pressed the program should exit if the file is empty,a message should be displayed indicate that there are no records to display. Database file Name=EMPDBF Fields in EMPDBF to be displayed on screen Employee Number- EMPNUM(5,0) Employee Name- EMPNAM(30,A) Employee Address-EMP ADDR(50 A)

1983


is it possible to create a physical file without dds?

1644


maximum number of subfiles that can defined in a rpg program for one display file is?

1582


what does opcode post do ?

1454


how to write *pssr ?

859


what are different types of substems?

1741


what are the three line types in rlu ?

1840


what is procedure prototype and procedure interface.

891


what is the difference between normal upddta to pf and updating using dfu program?

1077


what does defn do?

844


What is a query can be displayed without saving it?

898


what is elastic and non elastic subrile?

799


what is *inzsr used for?

1970


how do you read changed records backward in subfile?

851