Display fields and subfile side by side

2630 pts.
Tags:
as-400 rpgle
AS/400 Subfiles
Hi all
I am using V5R1. I have to design a screen where some fields should be on left side and a subfile on right side (both side by side). I have tried a lot but couldn't succeeded yet. I have made two separate record formats one for all fields on left side and the other one is subfile. but when I write left side record formate it do not get displayed.

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: 7  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
  • CharlieBrowne
    Are you getting any errors on your DSPF compile that mention overlapping fields?
    Are you using the OVERLAY keyword in your SFL.?


    41,430 pointsBadges:
    report
  • NeilD

    In order to display a subfile that takes up one side of a screen you have to make the subfile a Window format. That leaves the opposite  side of the screen free to become a simple i/o format. 

    485 pointsBadges:
    report
  • philpl1jb
    Seems like you might benefit by extending Neil's recommendation to windows on both sides of the screen.
    51,355 pointsBadges:
    report
  • hunshabbir7
    yes I did it according to your suggestion and used window subfile. It is showing accordingly (I have just written left side record) but I am not sure how to take inputs from both sides I mean how to EXFMT records. When I try to read left record it gives exception session or device error.
    2,630 pointsBadges:
    report
  • philpl1jb

    I would think your code might look like this

    write left

    exfmt right

    read left

    without seeing the DDS and the actual errors, it's hard to advise.

     

    51,355 pointsBadges:
    report
  • NeilD

    It sounds like you need to know which window your cursor is on.

    I use SFLCSRRRN(RRNSCRN1) on one window and SFLCSRRRN(RRNSCRN2) on the other window. Then when you press Enter the system knows which screen to WRITE and which to EXFMT. 

    485 pointsBadges:
    report
  • philpl1jb

    You can get the record and field that your cursor is on using RTNCSRLOC and the row of the subfile with SFLCSRRRN.

     

    If you want to know exactly where your cursor is:

    it's in the file information structure of the display file

    add the F spec keyword   INFDS(FILEDS)

    the Datastructure

    D  FILEDS     DS

    D     CurPos                            370 371B 0

    This binary number CurPos will contain the row and column of the cursor.

    Divide it by 256 to get the row

    The remainder is the column

     

    and finally, if you want to put your cursor back where it was you can use the DDS keyword CSRLOC

    51,355 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