Difference between revisions of "Macro %PageBreakFlag to create page breaks for PROC REPORT"
(Created page with "The macro %pagebreakflag is provided in addition to the PhUSE Paper “A SAS Macro for Breaking Pages” by Michael Knoessl, Boehringer Ingelheim Pharma GmbH & Co. KG and provide...")
Latest revision as of 13:07, 4 December 2012
The macro %pagebreakflag is provided in addition to the PhUSE Paper “A SAS Macro for Breaking Pages” by Michael Knoessl, Boehringer Ingelheim Pharma GmbH & Co. KG and provides the possibility to create a page break flag which can then be used by PROC REPORT.
License and Disclaimer
The BSD (3-clause-license) is used for this macro:
Copyright (c) 2007, Dr. Michael Knoessl, Boehringer Ingelheim Pharma GmbH & Co. KG
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DR. MICHAEL KNOESSL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Statistical analysis of clinical data is reported primarily as summary tables and listings. Many tables are specified as to display more rows than do fit on a single page. Such tables must be divided across two or more pages. However, breaking pages automatically is not a trivial task. The main problem is to identify the breakpoints, because it is the row (or group of rows) that shall be displayed on the page following the break, which identifies the row that shall be displayed last on the page preceding the page break. Determining the two rows between which a page break is to be introduced has to occur in the SAS® dataset that contains the result data. The macro %PAGEBREAKFLAG creates a counter variable that consecutively counts the prospective pages of the output table, and adds this variable to result data containing SAS® dataset.
|INDATA||one- or two-level dataset name of the input dataset|
|OUTDATA||one- or two-level dataset name of the output dataset|
|BYVARS||list of one or more BY-variables that identify groups of data and the order of the data as they will appear in the table; the last variable in this list must identify each group of data uniquely|
|TABLINES||number of rows of which the table body is comprised of|
|BLANKLINES||YES/NO-indicator whether groups of data will be separated by an empty line in the table|
|VOIDPCT||percentage (0 – 100) of allowed void area in the table body; i.e. the number of rows expressed as percentage of the total number of rows of the table body that are allowed to be left empty|
|INFOEXEC||YES/NO-indicator whether information about macro-execution is to be printed into the LOG|
|DELDATA||YES/NO-indicator whether temporary datasets created during macro-execution are deleted or kept at macro-termination|
Requirements and Assumptions
- Developed in SAS 8.2
- Examples created in SAS 9.2
- Can be used for PROC REPORT
- Table content cells are not splitted
- Table content lines needs to be known
- Validation is not provided
- Feel free to create a validation script
Please report any change ideas you may have. Some could be discussed and some may be implemented. When you work on a change requests or have implemented and published those, please change the status. Use the status “Open” for new requests, “Ongoing” when you try to implement them and are going to publish a solution and “Finished” when done.
|Change001||Create a validation script||open|
Please report any found bugs. When you work on a bug-solution or have implemented and published those, please change the status. Use the status “Open” for new bugs, “Ongoing” when you try to fix them and are going to publish a solution and “Finished” when done.
|1.0||Dr. Michael Knoessl||Provide macro|
Feel free to use or update the macro. You only need to be aware to follow the license, so keep the original author and when you use the source in a compiled environment, the copyright needs to be available in the corresponding documentation.
Discussions & Questions
Please enter here items you want to discuss or questions you might have.
“A SAS Macro for Breaking Pages”, PhUSE Paper 2007, Dr. Michael Knoessl