Natural for Mainframes Version 8.2.5 for Mainframes
 —  Statements  —

SKIP

SKIP [(rep)] operand1 [LINES]

This document covers the following topics:

For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.

Related Statements: AT END OF PAGE | AT TOP OF PAGE | CLOSE PRINTER | DEFINE PRINTER | DISPLAY | EJECT | FORMAT | NEWPAGE | PRINT | SUSPEND IDENTICAL SUPPRESS | WRITE | WRITE TITLE | WRITE TRAILER

Belongs to Function Group: Creation of Output Reports


Function

The SKIP statement is used to generate one or more blank lines in an output report.

See also Page Titles, Page Breaks, Blank Lines in the Programming Guide.

Processing

If the execution of a SKIP statement would cause the page size to be exceeded, exceeding lines will be ignored (except in an AT TOP OF PAGE statement).

A SKIP statement is only executed if something has already been output on the page (output from an AT TOP OF PAGE statement is not taken into account here).

Top of page

Syntax Description

Operand Definition Table:

Operand Possible Structure Possible Formats Referencing Permitted Dynamic Definition
operand1 C S         N P I                 yes no

Syntax Element Description:

Syntax Element Description
(rep)
Report Specification:

The notation (rep) may be used to specify the identification of the report for which the SKIP statement is applicable.

A value in the range 0 - 31 or a logical name which has been assigned using the DEFINE PRINTER statement may be specified.

If (rep) is not specified, the SKIP statement will apply to the first report (Report 0).

For information on how to control the format of an output report created with Natural, see Report Format and Control in the Programming Guide.

operand1
Number of Lines to be Skipped:

operand1 represents the number (1 - 250) of blank lines to be generated. This number may be specified as a numeric constant or as the content of a numerical variable.

If operand1 exceeds the page size of the report, the SKIP statement will result in a newpage condition.

Top of page

Example

** Example 'SKPEX1': SKIP                                               
************************************************************************
DEFINE DATA LOCAL                                                       
1 EMPL-VIEW VIEW OF EMPLOYEES                                           
  2 CITY                                                                
  2 COUNTRY                                                             
  2 NAME                                                                
END-DEFINE                                                              
*                                                                       
LIMIT 7                                                                 
READ EMPL-VIEW BY CITY STARTING FROM 'W'                                
  AT BREAK OF CITY                                                         
    SKIP 2                                                      
  END-BREAK                                                             
  DISPLAY NOTITLE CITY (IS=ON) COUNTRY (IS=ON) NAME                     
  /*                                                                    
END-READ                                                                
END

Output of Program SKPEX1:

        CITY         COUNTRY         NAME        
-------------------- ------- --------------------
                                                 
WASHINGTON           USA     REINSTEDT           
                             PERRY               
                                                 
                                                 
WEITERSTADT          D       BUNGERT             
                             UNGER               
                             DECKER              
                                                 
                                                 
WEST BRIDGFORD       UK      ENTWHISTLE          
                                                 
                                                 
WEST MIFFLIN         USA     WATSON

Top of page