Home page  
Help >
CalcObject Statement: Every
Version 7.11
CalcObject Statement: Every CalcObject Statement: Every
    Syntax: EVERY {fname | vname}
            EVERY {fname1 | vname1} {fname2 | vname2} ..
            EVERY fname (n)
    Options:
       /K - case sensitive compare
    Placement: After RETURN Section
    Description: Begins definition of breakpoint Section. 
       Following statements are performed whenever the value 
       of the specified break field changes; whenever the 
       value of a subsequent break field changes; and when 
       the end of the input data is encountered.
 
       In the second form, the breakpoint is triggered when 
       any one of the break fields changes.
 
       In the third form, the breakpoint is triggered when
       the first n characters of the break field changes.
 
       If the U option is used, the breakpoint test ignores case.
       The U option on EVERY should be used in conjunction
       with the U option on SORT or RELATE.
  
       Note that ATEND Processing consists of triggering
       all breakpoint [EVERY] sections, in order; then triggering
       the ATEND Section.
 
       The default behavior when there is not input, i.e., when
       the source collection is empty, is that ATEND Processing
       is still performed.
 
       To modify the default behavior, use the /O option on the
       ddlCreateCalcObject() function. This option suppresses ATEND 
       Processing if the source collection is empty.
 
       Beginning with TB API 8.0.152, local variables may also be 
       used as breakpoints. The following restrictions apply:
       . The variable must be a local variable;
       . The variable may be either string [SET] or numeric [CALC];
       . It must be defined in the RETURN section;
       . The variable calculation may not include aggregates;
       . The definition of the variable [CALC/SET] may be contained
         inside an IF/ELSE/ENDIF clause;
 
       Example:
 
          FILL A TEST
 
          SORT A TEST YEAR MONTH
 
          RETURN A TEST "RETURN      // -
             EVERY MONTH             // -
                PRINT 'Month:' MONTH // -
             EVERY YEAR              // -
                PRINT 'Year:' YEAR   // -
             ATEND                   // -
                PRINT 'Totals:'      //

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.