NEXT-LISTING

Function

Ends the current set of detail lines and begins another.

Syntax

NEXT-LISTING[NO-ADVANCE]
[SKIPLINES={num_lit|_var|_col}]
[NEED={num_lit|_var|_col}]

Arguments

NO-ADVANCE

Suppresses any line movement when no printing has occurred since the previous NEXT-LISTING or NEW-PAGE. The default increments the line position even when nothing was printed.

SKIPLINES

Number of lines to skip before setting up the new offset.

NEED

Minimum number of lines needed to begin a new listing or set of detail lines. If this number of lines does not exist, a new page is started. You can use NEED to prevent a group of detail lines from being broken across two pages.

Description

Used in tabular reports, NEXT-LISTING causes a new vertical offset in the page.

After NEXT-LISTING executes, line 1 is reset one line below the deepest line previously printed in the page body. That is, if you then write PRINT (1, 5), the string is printed on the next available line starting in column 5. Note that the Production Reporting reserved variable #current-line still reflects the actual line number within the page body.

SKIPLINES must be a nonnegative integer. If it is less than 0, then 0 is assumed.

NEED must be an integer greater than 0. If it is less than or equal to 0, then 1 is assumed.

Examples

begin-select
   cust_num  (1,1)edit 099999          ! Each detail group prints
   city(,+3)                           ! starting on line 1 since
  name(2,10,30)                        ! NEXT-LISTING keeps
  address(,+2)                         ! moving line 1 down the
  next-listing  skiplines=1  need=2    ! page. NEED=2 keeps 2
  from customers order by cust_num     ! line detail groups from
end-select                             ! breaking across 
                                       ! pages.

Note:

NEXT-LISTING automatically issues a Use-Column 1 command if columns are active.