External data structure issue

2505 pts.
Tags:
AS/400
I have a file declared in my program and an external DS defined on that file FFDXXX IF E K Disk D FDXXXDS E DS ExtName(FDXXX) File FDXXX has 5 keyfields and am using a SETGT with partial key list. The data type of the keyfields used in correct (I guess otherwise it will not compile) SetGT (Wkxxx : Wkxxx : Wkxxx) FDXXX; ReadPE (Wkxxx : Wkxxx : Wkxxx) FDXXX; It gives decimal data error after the ReadPE If I monitor the error and then see, the ReadPE is picking up the record correctly. But DS is not getting populated. Can any one explain me why this error is coming ?

Software/Hardware used:
AS400/RPG

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: 5  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
  • TomLiotta
    First, we can't say much without knowing what the error message ID is. We can guess, but you should tell us so we don't have to.   Second, we can't guess much of anything unless we know how the file is defined. We need to see the file field definitions from the file object as well as the external DS subfields that get compiled into the program. If we can't see the definitions, we can't tell what is happening.   It gives decimal data error after the ReadPE   How long after? Does the error occur during the execution of READPE? Or does it happen when some other instruction runs later in the program? How many versions of file FDXXX exist on the system?   Tom
    125,585 pointsBadges:
    report
  • CharlieBrowne
    Are you using PREFIX on either the file or the DS. That would cause the field names to not match,
    41,380 pointsBadges:
    report
  • philpl1jb
    Use DSPFD to Check the file LVLCHK .. should be YES
    
    Make sure that you are compiling over the same file that you are using during the run .. 
    dsppgrmref will show the lib/files used by the compile
    
    If none of these .. the file probably contains some bad data ,, obviously in a numeric, date or time field.
    49,950 pointsBadges:
    report
  • philpl1jb
    I would also check the types of the key fields.
    49,950 pointsBadges:
    report
  • Splat
    Add the INZ keyword to the data structure definition:
    D FDXXXDS        e Ds                  extname(FDXXX) inz    
    7,235 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