Records not writing into subfile in SQLRPGLE

2380 pts.
Tags:
AS400 SQLRPGLE
Hi

Im trying to create a simple sqlrpgle subfile program.

Its selecting the records file. but when i try to write the records in the subfile its giving session or device error occured error.

Program flow ::

Declare Cursor C1, and Query (will return one record)
Open C1
Whenever NOT FOUND goto End
dow sqlcod = 0
Fetch Next from C1 into (variables)
Write SFL05
EndDo
Close C1.

But for the same sql selection, i can able to show the records in a Display File. So i assumed problem with the subfile only.

Can i get some suggestions??


Suery



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: 3  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

    Fetch Next from C1 into (variables)

    RRN = RRN + 1  <-- increment the field associated with the Subfile in the F-Spec
    Write SFL05


    49,720 pointsBadges:
    report
  • Sureyz
    Thanks Phil.

    But the problem is when i try to show a subfile without any fields without increasing RRN.
    Simply I have two date fields and a subfile on the same page. I just want display only the date fields not the subfile at first, and once the date is validated it should show the subfile.

    But im unable to do this. because without increasing RRN its showing error.

    Can you help me.


    Surey.


    2,380 pointsBadges:
    report
  • Sureyz
    In my best try i got the answer for the previous query.

    Now i can view the sub-file with the date fields but not showing the sub-file.
    Here we have three coloums in the subfile. after the subfile display i just wanna update the records in the master if there any changes in the sub-file screen which is being showed.

    How can i do this with SQLRPGLE Sub-file ?


    Surey.   



    2,380 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