AS/400 RPGLE

335 pts.
Tags:
AS/400
RPGLE
0001.00 Fbsamplepf o  a e             disk
0002.00 Dcusdata          ds                  qualified
0003.00 Din                                   likerec(rcdfmt:*input)
0004.00 Dout                                  likerec(rcdfmt:*output) 0005.00 D                                     overlay(in)
0006.00  /free
0007.00     read rcdfmt cusdata.in;
0008.00     dow not%eof;
0009.00     dsply cusdata.in.sno;
0010.00     dsply cusdata.in.sname;
0011.00     read rcdfmt cusdata.in;
0012.00     enddo;
0013.00     cusdata.in.sno = 30;
0014.00     cusdata.in.sname = 'sud';
0015.00     write rcdfmt cusdata.out;
0016.00     *inlr = *on;
0017.00  /end-free 


The error I am getting for the above code is:

*RNF5276 30      2 The specified Factor 2 entry is not allowed for READ operation; specification is ignored. 
For the same code when I commented the lines of dow loop and allowed the program to write the two field values it worked perfectly. I understood that the problem is with the read opcode. What is the solution for this error?

Software/Hardware used:
iseries

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: 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
  • philpl1jb

    You need an F-spec for the input file.

    I think you want your data structure to refer to an external file .. which needs an E in the correct column and the extfile name keyword.

     

    49,720 pointsBadges:
    report
  • TomLiotta

    For the same code when I commented the lines of dow loop and allowed the program to write the two field values it worked perfectly.

    For the same code when I comment out the lines of the DOW-loop, the compile still fails with the same RNF5276 error. The READ at statement 0007.00 is outside of the DOW-loop so it's not commented out.

    Phil is right. If you have a READ, you have to define a read-capable file.

    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