WHAT IS DECIMAL DATA ERROR IN RPG IV...WHEN WILL IT HAPPENS?
Answer Posted / 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 |
Post New Answer View All Answers
Using %check we are checking monika in mona what is output? What is %SCAN?
what are the three types of keywords associated with printer file ?
what are the different types of arrays available in rpg ?
What Is Default Data Type (if You Define Decimals '0') In Physical File?
what is subfile?
what is service program?
what is the favicon.ico request that my site receives now and then?
can you specify a display file to be used in the following modes input,output, or combined modes ?
WHICH REPLY CODE IS USED BT sftp ? ... (e.g.226 is used by FTP IF FILE IS TRANSFERED)
what does the opcode free do?
how would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed?
how do you specify the number of records to roll in a subfile ?
what are various techniques to pass parameters from one program to another?
how can you specify no duplicate key?
what is message subfile?