[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Info Needed...



[Shankar Swamy <ushash01@shafika.vetri.com> asks how breaks are
 processed in SQR...]


The SQR Language Reference (version 4), page 219, in the section for
the Print command includes these details on the On-Break field:

  "Following is the sequence of events for a query containing ON-BREAK
  fields:

  1. Any BEFORE procedures are processed in ascending LEVEL sequence
     before the first row of the query is retrieved.

  2. When a break occurs in the query, the following happens:
     a. AFTER procedures are processed in descending sequence from the
        highest level to the level of the current break field.
     b. SAVE variables are set with the new value.
     c. BEFORE procedures are processed in ascending sequence from the
        current level to the highest level break.
     d. Any breaks with the same or higher level numbers are cleared so
        they will not break on the next value.
     e. If a PROCEDURE has been declared, it is invoked.
     f. If SKIPLINES was specified, the current line position is
        advanced.
     h. The value is printed (unless PRINT=NEVER was specified).
  3. After the query finishes (at END-SELECT) any AFTER procedures are
     processed in descending level sequence."


The manual continues with some good examples.

I strongly suggest getting access to a copy of the SQR Language Reference
and the SQR User's Guide.  Many questions that SQR novitiates have can
be answered in a few seconds with a quick thumbing of the manuals.

Adam Dray