Version 4.2.6 for Mainframes (Update)
 —  Statements  —

SUSPEND IDENTICAL SUPPRESS

SUSPEND IDENTICAL [SUPPRESS] [(rep)]

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 | SKIP | WRITE | WRITE TITLE | WRITE TRAILER

Belongs to Function Group: Creation of Output Reports


Function

The SUSPEND IDENTICAL SUPPRESS statement is used to suspend the Natural session parameter setting IS=ON (which suppresses the output of identical field values) for the processing of one record.

See also session parameter IS (in the Parameter Reference).

Top of page

Syntax Description

(rep)
Report Specification:

The notation (rep) may be used to specify the identification of the report for which the SUSPEND IDENTICAL SUPPRESS 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 SUSPEND IDENTICAL SUPPRESS statement will be applicable to the first report (Report 0).

For information on how to control the format of an output report created with Natural, see Controlling Data Output (in the Programming Guide).

Top of page

Examples

Example 1 - Program with SUSPEND IDENTICAL SUPPRESS

** Example 'SISEX1': SUSPEND IDENTICAL SUPPRESS                         
************************************************************************
DEFINE DATA LOCAL                                                       
1 EMPLOY-VIEW VIEW OF EMPLOYEES                                         
  2 PERSONNEL-ID                                                        
  2 FIRST-NAME                                                          
  2 NAME                                                                
  2 CITY                                                                
1 VEH-VIEW VIEW OF VEHICLES                                             
  2 PERSONNEL-ID                                                        
  2 MAKE                                                                
END-DEFINE                                                              
*                                                                       
LIMIT 15                                                                
*                                                                       
RD. READ EMPLOY-VIEW BY NAME STARTING FROM 'JONES'                      
  /*                                                                    
  SUSPEND IDENTICAL SUPPRESS                                       
  /*                                                                    
  FD. FIND VEH-VIEW WITH PERSONNEL-ID = PERSONNEL-ID (RD.)
    IF NO RECORDS FOUND                                   
      MOVE '***NO CAR***' TO MAKE                         
    END-NOREC                                             
    DISPLAY NOTITLE                                       
            NAME (RD.) (IS=ON)                            
            FIRST-NAME (RD.) (IS=ON)                      
            MAKE (FD.)                                    
  END-FIND                                                
  /*                                                      
END-READ                                                  
END                                                      

Output of Program SISEX1:

        NAME              FIRST-NAME              MAKE        
-------------------- -------------------- --------------------
                                                              
JONES                VIRGINIA             CHRYSLER            
JONES                MARSHA               CHRYSLER            
                                          CHRYSLER            
JONES                ROBERT               GENERAL MOTORS      
JONES                LILLY                FORD                
                                          MG                  
JONES                EDWARD               GENERAL MOTORS      
JONES                MARTHA               GENERAL MOTORS      
JONES                LAUREL               GENERAL MOTORS      
JONES                KEVIN                DATSUN              
JONES                GREGORY              FORD                
JONES                EDWARD               ***NO CAR***        
JOPER                MANFRED              ***NO CAR***        
JOUSSELIN            DANIEL               RENAULT             
JUBE                 GABRIEL              ***NO CAR***        
JUNG                 ERNST                ***NO CAR***        
JUNKIN               JEREMY               ***NO CAR***       

Example 2 - Same as Previous Program, but without SUSPEND IDENTICAL SUPPRESS

** Example 'SISEX2': SUSPEND IDENTICAL SUPPRESS (compare with SISEX1)   
************************************************************************
DEFINE DATA LOCAL                                                       
1 EMPLOY-VIEW VIEW OF EMPLOYEES                                         
  2 PERSONNEL-ID                                                        
  2 FIRST-NAME                                                          
  2 NAME                                                                
  2 CITY                                                                
1 VEH-VIEW VIEW OF VEHICLES                                             
  2 PERSONNEL-ID                                                        
  2 MAKE                                                                
END-DEFINE                                                              
*                                                                       
LIMIT 15                                                                
RD. READ EMPLOY-VIEW BY NAME STARTING FROM 'JONES'                      
  /*                                                                    
  /* SUSPEND IDENTICAL SUPPRESS    /* statement removed            
  /*                                                                    
  FD. FIND VEH-VIEW WITH PERSONNEL-ID = PERSONNEL-ID (RD.)              
    IF NO RECORDS FOUND             
      MOVE '***NO CAR***' TO MAKE   
    END-NOREC                       
    DISPLAY NOTITLE                 
            NAME (RD.) (IS=ON)      
            FIRST-NAME (RD.) (IS=ON)
            MAKE (FD.)              
  END-FIND                          
  /*                                
END-READ                            
END                                

Output of Program SISEX2:

        NAME              FIRST-NAME              MAKE        
-------------------- -------------------- --------------------
                                                              
JONES                VIRGINIA             CHRYSLER            
                     MARSHA               CHRYSLER            
                                          CHRYSLER            
                     ROBERT               GENERAL MOTORS      
                     LILLY                FORD                
                                          MG                  
                     EDWARD               GENERAL MOTORS      
                     MARTHA               GENERAL MOTORS      
                     LAUREL               GENERAL MOTORS      
                     KEVIN                DATSUN              
                     GREGORY              FORD                
                     EDWARD               ***NO CAR***        
JOPER                MANFRED              ***NO CAR***        
JOUSSELIN            DANIEL               RENAULT             
JUBE                 GABRIEL              ***NO CAR***        
JUNG                 ERNST                ***NO CAR***        
JUNKIN               JEREMY               ***NO CAR***       

Top of page