This was rather disappointing as RPGLE is over 21 years old , free format calculations 14 years old, even free format definitions RPG is in its third year. All of the examples I found looked overly complicated for a beginner, so I decided to create this post showing a simple subfile program written in modern RPG. The examples in this post are the way I would write a simple subfile program using totally free RPG. I am sure that my examples are not the way all other IBM i developers would write theirs.

Author:Meztikasa Gohn
Language:English (Spanish)
Published (Last):6 June 2014
PDF File Size:14.61 Mb
ePub File Size:19.12 Mb
Price:Free* [*Free Regsitration Required]

SFLDROP Subfile Drop keyword for display files You use this record-level keyword on the subfile-control record format to assign a command attention CA key or a command function CF key that the workstation user can press to fold or truncate subfile records that require more than one display line.

When the workstation user presses the specified key, the IBM i operating system displays the records again in folded form. Each record continues onto subsequent lines immediately following the line the record starts on. By pressing the specified key, the form of the displayed subfile changes from one state to the other.

The IBM i operating system truncates subfile records in the middle of output-only fields. However, if the truncation is in the middle of an input-capable field, the whole field is omitted from the display.

If this results in omitting the entire record from the display, an error message is sent to the display and the record is not truncated. Instead, it is displayed in folded form. Notes: A warning message is sent at file creation if the entire record fits on a single display line. If the subfile contains input-capable fields, it is recommended that you specify a CF key rather than a CA key.

If you specify a CA key in this situation, changed data is lost when the key is pressed. If the function keys are different, only the key specified for the most recently displayed subfile is in effect. Pressing the function key affects the subfile containing the cursor. If the cursor is not positioned in a subfile, the function key affects the upper subfile. Indicators are checked at the time the subfile is displayed.

Both keywords must use the same key. Option indicators are valid for this keyword.


SFLDROP (Subfile Drop) keyword for display files

The plus sign or More text indicates that the workstation user can move the text lines on the subfile to display more records by pressing the Page Up key. This line is needed for the text More and Bottom. 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. The second parameter tells the system what scrolling indicator should be used for nongraphical displays. Both versions of the subfile folded or truncated must occupy three lines.


sponsored links



SFLEND (Subfile End) keyword for display files


Related Articles