Midrange News for the IBM i Community

Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Avoid Clearing Display Lines beyond OVERLAY using CLRL
has no ratings.
Published: 27 Dec 2011
Revised: 23 Jan 2013 - 4138 days ago
Last viewed on: 22 May 2024 (6507 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Avoid Clearing Display Lines beyond OVERLAY using CLRL Published by: Bob Cozzi on 27 Dec 2011 view comments

The DDS Display File keyword, CLRL avoids clearing the display before writing the record format to that display. Normally any existing screen format is erased unless OVERLAY is used and the new format does not contain output on any line that the existing screen occupies.

CLRL goes beyond that by not clearing the existing screen at all. Thus allowing you to write  stuff that overlays existing screen content.

The CLRL keyword accepts one parameter, which can be a variety of options, including:

  • CLRL(*NO) - Do not clear any existing content currently on the screen.
  • CLRL(*ALL) - Clear the entire screen
  • CLRL(*END) - Clear the screen from the start of the new record format, to the bottom of the screen.
  • CLRL( nn ) - Clear nn lines starting with the first line of the new record format.

When using CLRL( ) you may also need to include the RSTDSP(*YES) keyword on the CRTDSPF CL command when creating the display file. I say "may" because its often necessary depending on the program flow in your shop and the other display formats on the screen.

Return to midrangenews.com home page.
Sort Ascend | Descend