RPG: Two PF have same field

15 pts.
Tags:
PF/LF
RPG
There are two PF, each PF have same named field, but the length of the field not same. How can I use the field in the program?

Answer Wiki

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

One option would be to use the Prefix keyword to alter the names of the fields found in one of the files. Long term I would recommend finding a way to eliminate the use of the same name for what would appear to be two different fields.

Bruce Vining

Discuss This Question: 2  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
  • Jlunger1
    If it's just one field I'd reference the external file in my I specs with a field override name. But Bruce has the long term solution. If you are using DDS for the definition you really should consider using a REFFILE to contain all your field names. That will keep you from having duplicate field names.
    45 pointsBadges:
    report
  • TomLiotta
    If it’s just one field I’d reference the external file in my I specs with a field override name. Since the fields have different lengths, the file format level IDs will be different. A level check will result. If disabling level checks is suggested, then which format should provide the compile specs? What will happen when a record buffer has the other record format in it? (Data will probably be corrupt.) The problem needs more explanation. Why is having to fields with the same name a problem when they have different lengths? Most likely the two files are to be accessed concurrently. RPG will want to store the fields in the same memory location under the single name. Perhaps the two records can be loaded into separate DS's and qualified references will the fields different. Tom
    125,585 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