Decimal data error

1,420 pts.
Tags:
AS/400
CL Program
RPG Program
Hi all, I have a batch job which calls a CL program which internally have a call to another RPG program, after submission of the job I am getting decimal data where.... I'm adding the value of the Zoned decimal variable to Packed decimal variable. But when I run the RPG program individually there is no error. What could be the reason in this case? Please tell the way how to find the root cause in this case, while answering job which in MSGW because of this ERROR (C D G F).

Software/Hardware used:
AS400, RPG 400,CLLE,
ASKED: September 3, 2013  1:31 PM
UPDATED: December 4, 2013  6:57 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    One of your two numeric variables does not contain a numeric value .. it might be null or it might be an alpha string or the like.  If the job is waiting on the RPG Program error and you do a D for Dump you will get a listing which shows the values of all of the variables.  This will show you what values these two variables have.
    48,545 pointsBadges:
    report
  • TomLiotta
    The cause is that one of the fields doesn't have a numeric value. But we have no idea why values would be incorrect if you don't show us the code that fails. Code should show the failing instruction, the data definitions plus any code that alters the values. -- Tom
    125,585 pointsBadges:
    report
  • MDratwa
    Have you tried to run the batch job interactively with the debugger.  It maybe a problem in the CL program in front of the RPG program causing the problem.  I found if a batch job is having a problem, I run it interactively under the debugger and check it from top to bottom at each statement and check the variables before and after each statement.  It takes time but if you check it as it runs, there is no assumption to the value of the variable as they go thru the program.
    785 pointsBadges:
    report
  • Sai4AS400
    Both the fields have same values...imfact both sized   (7 0)...to hold the date...and doing the same..
    1,420 pointsBadges:
    report
  • philpl1jb
    .. and is there a data decimal error when "Both the fields have same values "
    48,545 pointsBadges:
    report
  • TomLiotta

    We still need to see the definitions and the code. It isn't very useful to tell us about the definition. We need to see it because of differences in how definition methods can affect values. And we need to see code that affects values, most commonly because of multiple programs in the job but for other reasons, too.

    How did you determine that the two fields have the same value? What operation code is used? If they have the same value, why are they being added? There are too many unknowns, so you need to copy/paste code for us to look at.

    Tom

    125,585 pointsBadges:
    report
  • ToddN2000

    "I'm adding the value of the Zoned decimal variable to Packed decimal variable" 

    How is the variable defined in the CL?

    How is it defined in the RPGLE? 

    what command are you using to initialize the parm to be passed to the RPGLE?

    How is the parm defined in the RPGLE *ENTRY parm list?

     

    6,360 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following