Is scrolling posible in normal AS/400 display file ?

165 pts.
AS/400 Display File
Display File
Instead of using subfile can a normal display file be made to behave as a having page-up-down properties? What differentiates a subfile from a display file although both are DSPF ?


Supriyo B

Software/Hardware used:

Answer Wiki

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

No. The difference being that a subfile is a group of records that are read from and write to the display file in a single operation. It is not an actual file but a temporary place to store data for the display file to use. Also, it can only be accessed by relative record number.

I’m not sure what it is that you are trying to do, but here is a link to several articles that may help:,289625,sid3_gci1035043,00.html#


There is no problem using PageUp/Down keys for any DSPF that you want to create. When the key is pressed, display the record that you want to be on the screen.

But a subfile contains a <b>set</b> of records that are all formatted the same. That’s why they make sense for scrolling. Scrolling through multiple different formats doesn’t need PageUp/Down. The program logic can use any function keys that you want.

If you really want display files with page scrolling, like a web page with HTML, then code UIM panels. Panels and panel groups are always scrollable when they exceed a single screen image.


i disagree. way back in the days of the sys/34 and sys/36 i designed screens that allowed you to scroll.

i had 10 lines of output (some allowed input as well) that were defined as one field each.

I had a datastructure that matched the output format i wanted on the display. each record that was read from the file, was mapped to the datastructure and the datastructure was MOVEL into ROW1, ROW2, ROW3, etc, depending on the value of my “X” factor.

when roll up/roll down were pressed i would reload the ROWxx fields.

i later started using an array to hold my data fields and emulated what later became a subfile, except that i had to process it all manually.


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.
  • Vatchy
    Actually, you can make a display file look like a subfile to the user. You will just have to handle all of the page-up/down, +/- display, begin/end of file, etc. in your program rather than letting the system handle that for you.
    1,415 pointsBadges:
  • ElTerrifico
    It would take a lot of effort to duplicate the functionality and look of a subfile without using a subfile. Subfiles are so easy to code, I can't even think of a reason to avoid them.
    620 pointsBadges:
  • TomLiotta
    way back in the days of the sys/34 and sys/36 i designed screens that allowed you to scroll. And way back in s/34/36 days, it made sense to do it that way. But it doesn't make sense on AS/400s. Subfiles make sense. Way back in Autocoder days on 1401s, I used IOCS and DIOCS macros for access to disk files. But it'd be pretty rare circumstance to code MI to do it on an AS/400. It made sense then; it doesn't now. Now, to "scroll" through a group of related record formats for a complex display is reasonable. The first screen might contain basic customer identification info, for example. Then, PageDown might bring up ShipTo addressing. PageDown again might bring CreditData for the same customer. Using scroll keys to control movement between the sections is probably very reasonable. But that's totally the choice of the developer (and non-standard -- F7/F8 might be better). Other keys work just as well. I've used COBOL for very specific display functions because of the BEFORE/AFTER ROLLING feature. I've used DSM for very specific cases where I needed to display scrollable lists in ILE CL without having a DSPF available. But, I wouldn't recommend the same thing today just because I did something one way in a particular case or on an obsolete system years ago. As I noted in my answer, it can be done; it just doesn't make sense to do it as a replacement for subfiles. Tom
    125,585 pointsBadges:

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.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: