RPG/400 error

265 pts.
Tags:
AS/400 development
RPG
RPG/400
i am getting error while moving data from one field to another field. I have two files xodcfp(physical file) xounpr 8 p(2) xodstsf(physical file) xsuprc1 10a while moving data from xounpr to xsuprc1 i am gettig error.... i tried EVAL XSUPRC1 = %EDITC(XOUNPR:'X') but still getting error... please advice

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

What error are you getting?

Regards,

Martin Gilbert.

////////////////////////////
That’s the only error?
– I would have expected an RNF7030 – which would have told you the field that was undefined and the
line number of the error.
– If you seach on your error RNF7503 it will either tell you the line number or place the error immideatly below the line on the listing.
Error occurs during compile?
_______________________________________________

D XOUNPR S 8P 2 INZ(15.23)
D XSUPRC1 S 10A
C EVAL XSUPRC1 = %EDITC(XOUNPR:’X’)
C XSUPRC1 DSPLY
C EVAL *INLR = *ON
C RETURN
__________________________________________________

1. This program works
2. Are both files used in F spec’s for input or update?
3. This is RPGLE?
Phil

///////////////////////////////////////////////////////
You’ve got to look at the compiler error message
1. there should be a RNF7030
2. if you search the compiled source you should see the each error with
the line number and field name other errors are immediately after the line.
You should also be able to search the compiled listing for the field in question – it should show
It on the input or output specs and it’s structure.

If the field in error comes from the DSPF – the record has to be used in the RPG program
Sometimes output files need to be set to Input – Add so you can get full use of the fields.

And then it appears that you’re changing things randomly
//////////////// this was your source yesterday
xodcfp(physical file)
xounpr 8 p(2)
xodstsf(physical file)
xsuprc1 10a
EVAL XSUPRC1 = %EDITC(XOUNPR:’X’)

//// And this was today – the file and field names have changed
FWDRPIK CF E WORKSTN
FXFDOST O E DISK
FTFL01 UF E K DISK
FTFL02 IF E K DISK
FTFL03 IF E K DISK

C EVAL DSUPPRA = %EDITC(XFUNPR:’X’)

XFUNPR = 8 P2

DSUPPRA = 10A (resultant field for XFDOST file)
/////////////////////

Discuss This Question: 6  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
  • Askt
    RNF7503 30 1 Expression contains an operand that is not defined. * * * * * E N D O F M E S S A G E S U M M A R Y * * *
    265 pointsBadges:
    report
  • Askt
    resultant file xodsts in O (output) mode. that is why i am getting error. how i can overcome for this issue. please advice
    265 pointsBadges:
    report
  • Gilly400
    Hi, I don't think that's the cause of your error. Can you post some code? Specifically the File specs? Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Askt
    FWDRPIK CF E WORKSTN FXFDOST O E DISK FTFL01 UF E K DISK FTFL02 IF E K DISK FTFL03 IF E K DISK C EVAL DSUPPRA = %EDITC(XFUNPR:'X') XFUNPR = 8 P2 DSUPPRA = 10A (resultant field for XFDOST file)
    265 pointsBadges:
    report
  • Vrn400
    The error may be due to improper data defination. You are moving a Integer field to a char field . EVAL will give error for this. You can try MOVE instead of EVAL.
    20 pointsBadges:
    report
  • philpl1jb
    ohhhhhhhh .. this was a question from April .. now it all makes sense.. This spec doesn't make the fields in Xfdost available. FXFDOST O E DISK In rpgiv I would describe it as Input with Add rights but I don't think that's possible in RPG III where input f-spec requires an actual input type command. So fields must be added in I spec's, C spec's .. external data structure .. was that available in RPG? You can write to the file fine and it will populate the output fields but just doesn't see them until then. Phil
    50,595 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