1 / 16

Advance RPG

Advance RPG. Chapter 12 Subfiles. Subfiles. Collection of records that is handled as a unit for screen input/output (I/O). Deals with displaying multiple records. Last chapter: Entered a section number and then display info about the section.

dagmar
Download Presentation

Advance RPG

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advance RPG Chapter 12Subfiles

  2. Subfiles • Collection of records that is handled as a unit for screen input/output (I/O). • Deals with displaying multiple records. • Last chapter: Entered a section number and then display info about the section. • This chapter: Enter a course number and display all sections offered.

  3. Subfiles • Additional records layouts in DDS • One to define a subfile record (subfile record format) • One to control the subfile and its display (subfile Control format)

  4. Subfiles • Subfile Record Format: • Describes the fields that are to appear on the screen. (If same as PF you can REF) • Must have SFL in record level keyword • Subfile Control Record Format: • Must immediately follow the above. • Controls the display of the subfile records through the use of special record-level keywords.

  5. Subfile • Subfile Control Record Format: • SFLCTL: (Control) Identifies a record as the subfile control record for subfile named. • SFLDSP: (Display) If keyword is active, subfile will display when control record format is displayed. • SFLPAG: (Page) Defines how many records are displayed at one time on the screen. • SFLSIZ: (Size) Should be => SFLPAG. System will handle paging if it exceeds one screen.

  6. Subfile • Subfile Control Record Format • Optional Records Level Keywords: • SFLDSPCTL: (Subfile Display Control) enables the display of any output fields or constants described within the control record format. • SFLCLR: (Subfile Clear) If active the subfile is cleared of all records displaying. Indicator is required for this.

  7. Subfile Loading Techniques • Loading the Entire Subfile • Loading the Subfile a Page at a Time • Variation 1: Subfile size one > than page • Variation 2: Subfile size much bigger than page • Variation 3: Subfile size = page

  8. Subfile Loading Techniques • Loading the Entire Subfile • Size is set to hold the maximum number of records, all records are loaded into the subfile before anything is displayed. • Easiest to code, but you have the slowest initial response. Subsequent paging is very fast. • Inappropriate if you have a large number of records and the user will not wait to see them all.

  9. Subfile Loading Techniques • File Spec Changes (p. 278) • Code (p. 279)

  10. Subfile Loading Techniques • Variation 1: Subfile size one greater than page • Loads subfile one page at a time based on user’s request for additional pages. • New keywords: • PAGEDOWN, ROLLUP • SFLEND • If off, the system displays a plus sign. • If on, it is not displayed. • SFLRCDNBR

  11. Subfile Loading Techniques • Variation 2: Size much Bigger than Page • Also builds subfile one page at a time. • Doesn’t have to allocate additional space in subfile before loading. • Slight changes to display file: • Subsiz • Pagedown moved to SFLSECT record format. • RPG code remains the same.

  12. Subfile Loading Techniques • Variation 3: Subfile size equals page • Appropriate for scrolling through a large number of records. • Response time is consistant. • Subfile only stores one page of information. • DDS changes are minimal. • RPG changes are great. • Subfile must be cleared before every display. • Load next 15 records or start at the beginning.

  13. ReadC Operation • READC (Read Next Changed Record) • Generally used with a loop, reads only those records from a subfile that were changed during a prior EXFMT operation.

  14. Subfile Loading Techniques

  15. Subfile Loading Techniques

  16. Subfile Loading Techniques

More Related