Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / madhusudhan

For the above answer posted by Narendra, there are 19
People who told yes, but did they test this or verify.
Create a Char variable of Lenth 5 and Numeric variable of
lenth 5 and see the result .
D Num1 S 5 P 0
D Char1 S 5 A INZ('ABCDE')
C MOVE Char1 Num1
C Num1 DSPLY

Num1 will not give a Decimal Data error , instead it gives
the values Num1 = 12345. If you use eval
C EVAL Num1 = Char1
Eval will fail during compilation itself.
As per my analysis , Decimal Data error occurs when junk
values or special characters are passed to Numeric
variable. ( Ex : !, @ , #.$) . For testing Intialize the
above variable Char1 with atleast one special character and
just see the result.

This is only one example which i have given , and i heard
that during Parameter passing also this occurs , but dont
know in which scenerio , if anyone knows more on Decimal
Data error, kindly plz post.

Is This Answer Correct ?    24 Yes 0 No

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

Answer / narendra

If you have defined any field as numeric and the value
being inserted into that field is character then system
will throw the message "decimal data error".

Is This Answer Correct ?    31 Yes 8 No

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

Answer / 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

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

Answer / arun

for abv to Mr.Madhusudhan

"Parameter passing also this occurs in cl prog"


bcoz if we pass the parameters in different formates then
it will occurs data decimal error

plz say if i am incorrect

Is This Answer Correct ?    3 Yes 1 No

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

Answer / venkat

suppose if i declare data area with the length of 8 char
and i am receiving that data area as data structure and if i give only 7 char value. if i compile the program program will compile but if you call that program it will throw the error as decimal data error 

Is This Answer Correct ?    2 Yes 0 No

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

Answer / sulthan

Divide by '0'

Is This Answer Correct ?    4 Yes 27 No

Post New Answer

More IBM AS400 AllOther Interview Questions

under given circumstances, my cgi should link to another site. How to implement this?

0 Answers   IBM,


what is code for reading member in rpgle when wehave like extmbr(*all) so we have 3 members in *all then i want to read first record in 2member

2 Answers   HCL,


Define an Interactive Job?

1 Answers  


how many printer files maximum can be used in single rpg program?

0 Answers   IBM,


Hello friends, i am new to AS/400. Can any one help me in AS/400 i meant say can you send me some FAQS and interview questions.

7 Answers   HanceInc, IBM,


can a join logical file be updated?

0 Answers   IBM,


List the steps/commands necessary to accomplish the following: a. Copy data from the file ORDHDR into file ORDHIST b. The file ORDHIST may or may not exist c. If the file ORDHDR does exist, it may or may not contain data d. The file ORDHIST may or may not contain data, if the file does contain data the old data should be erased

1 Answers  


What Does Lokup Does In Tables & Arrays?

0 Answers   IBM,


how can database records be read without lock ?

1 Answers   IBM,


What is the draw back of Procedures? why we are going to Modules?

0 Answers  


load all subfile logic in sqlrpgle and when updating particular record it must be lock form other jobs (not a file)?

1 Answers   Wipro,


PGM QSH CMD('/QOpenSys/bin/sftp -b/home/test/myfile.txt serverUserID@server') ENDPGM In above example,what is content of myfile.txt ...Thanx

2 Answers  


Categories