[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Info Needed - SQR on-break logic.
I agree with everything you say except item 1. Unless I'm doing something
wrong, it appears to me that all BEFORE procedures are processed immediately
after the return of the first row of data.
I wrote this little sqr to demonstrate for myself when things happen. I've
also created a bmp (800x600) and a jpg image of a flow chart if anyone is
interested. This particular sqr accesses the PeopleSoft HRMS demo database
(version 6.x). If you want to test it out, you'll have to modify it as
appropriate. I then uploaded the sqr.log into Excel. (It's a tab delimited
file)
> ----------
> From: Dray, Adam[SMTP:Adam.Dray@PHH.COM]
> Sent: Tuesday, July 06, 1999 10:23 AM
> Subject: 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
>