You use this field-level keyword on the subfile-control record format to specify that the page of the subfile to be displayed is the page that contains the record. The following is an RPG subfile example with a selection option. This example loads the entire subfile at one time. You use this record-level keyword on the subfile-control record format to enable the display of a plus sign (+) or text (More or Bottom) in the lower-right display.
|Published (Last):||9 June 2005|
|PDF File Size:||4.85 Mb|
|ePub File Size:||20.27 Mb|
|Price:||Free* [*Free Regsitration Required]|
In this example, either the program or the workstation user can set the value of the field before displaying the subfile. TOP record Let’s create the subfile now.
Your program must set the indicator on or off when displaying the subfule. For selection lists, the plus will be positioned to the right of the choices for the list.
SFLEND (Subfile End) keyword for display files
Select the option Select Record Keyword: In this chapter we’ll create a subfile which will show all the cards from a client given its ID. The scroll bar is shown for graphical displays. You use this field-level keyword on the subfile-control record format to subfjle that the page of the subfile to be displayed is the page that contains the record whose relative record number is in this field.
Press Ae400 to go back to the previous screen.
You have to activate some options now: Options Select Overlay without erasing: For the 27 x display size, positions through of every line of the subfile will be reserved for the scroll bar. If the device configuration that is being used supports a pointer device, the scroll bar can also ssubfile through the subfile. Multiple line subfiles can be used. Executing the subfile Source code.
The second parameter tells the system what scrolling indicator should be used for nongraphical displays. If there is not room for the extra line on the display or in a window, a message is issued at file-creation time and the file is not created.
If your program sets off the indicator for SFLEND when displaying the subfile, either the plus sign, the More text, or the scroll bar with the scroll box one page size above, the scroll button is displayed with the last page of the subfile. DDS keyword entries for display files positions 45 through Thus no fields can occupy more than one line aa400 the subfile.
For the 27 x display size, positions through of the line immediately following the last line occupied by the subfile are used for the beginning attribute character, the right-aligned More or Bottom text, and the ending attribute character. For the 27 x display size, positions through of the last line occupied by the subfile are used for the beginning attribute character, plus sign, and ending attribute character.
Subfille These indicators allow us to manipulate the status of the subfile from the RPG code.
For example, if a page can contain three records, and nine records are contained in the subfile, a SFLRCDNBR field value of 8 causes records 7, 8, and 9 to be displayed.
Set the indicators off to display the plus sign or the More text. When the last page of the subfile is displayed, the operating system displays the plus sign, the More text, or the scroll bar with the scroll box one page size above the scroll button if the indicator is off.
Options On the General Keywords menu insert the data you see below: Creating the subfile control This field creates a subfile control record, which works like the heading on the list.
We’re going to add an indicator to this field, which will be activated when no record is found for an ID inserted either the ID doesn’t exist or it doesn’t have any associated cards. If not, the plus sign disappears from the display or the Bottom text appears.
AS/ Chapter 9: Subfiles
This line is needed for the text More and Bottom. The scroll bar is displayed with the scroll box placed at a position on the scroll bar that best represents where the user is in the subfile. To make the manipulation of several tables easier, we’ll create a view with the fields we’ll use on the subfile. For other subfiles, the scroll bar will be positioned on column Your program cannot find out, when the IBM i operating system is paging through the subfile, which page of the subfile is displayed.
The format of the keyword is: The scroll bar is displayed with the scroll box just above the bottom scroll button. The scroll bar indicates different types of information about the subfile: Adding the selected fields to the record The final result: Let’s add some proprieties to the Client ID field.
Columns description Let’s add some proprieties to the Client ID field. Options Press enter to go back. For the 24 x 80 display size, positions 77 through 80 of every line of the subfile will be reserved for the scroll bar. If there is no input-capable field, the cursor is positioned at the first output-only or constant field.
SFLRCDNBR (Subfile Record Number) keyword for display files
Check out the Display file chapter if you don’t remember how to do this. The format of the subfipe is: Where the user is at in the subfile How big the subfile is What proportion of the subfile the user is viewing. Creating the subfile record When you press Enter a new record appears.