Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-14-2005, 03:15 AM
toby dunn
Guest
 
Posts: n/a
Default Re: Page break algorithm in SAS?

Julie,

Sounds like it would take multiple passes of the data.

That said I must ask do you have to go the SAS excel PDF route, can you go
the SAS to PDF.

r if you can firstbreak the fie up the way you want then shoot those files
to excel it might help.

Toby Dunn





From: oseithedude@GMAIL.COM
Reply-To: oseithedude@GMAIL.COM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Page break algorithm in SAS?
Date: Tue, 13 Dec 2005 15:01:08 -0800

Hello! I have a dataset containing the names of approximately 1,000
organization (variable = name), the state that the organization is in
(variable = state), and a numeric id indicating whether the
organization type is public or private (variable = id). There is also
some financial data for each organization in this dataset but that is
irrelevant. Every year, I take this dataset and transfer the names from
it to a hardcopy publication (a generalized example of what a couple of
the pages look like can be found at this website:
http://tinyurl.com/agvd7 - the actual organization names were taken out
and replaced with generic names but they are ordered alphabetically
within the state and type of organization).

I'm trying to figure out if there is a way I can, using SAS, determine
which organization is the last organization on each page (there usually
end up being around 16 or 17 pages)? From the original dataset, I have
a SAS program that exports the data into a text file, and from that
text file I do a lot of cut and pasting into Excel before converting
the Excel file into PDF.

Let me describe to you the way the organization names are set up in the
table:

1) The names are sorted first alphabetically by state (organizations in
Alabama first; Wyoming last), then by whether they are public or
private (IF there are public organizations they are displayed first,
followed by all private organizations, IF there are any), then
alphabetically by organization name. The names are already sorted this
way in the original dataset. There is at least one organization in
every state, but there are some states that don't have any public
organizations and some that don't have any private organizations.
Again,
you can go to this website: http://tinyurl.com/agvd7 for an example of
some pages.

2) In listing the organizations, I use 80 lines for each page. The 80
lines start at the bottom of the table header and extend down to where
the last organization of the page is listed. For every page, the first
line after the table header is always blank. The second line always
contains the current state name. The third line is always blank. The
4th line always contains an indication of type of organization (public
or private). The 5th line is where the listing of organizations begins
and the listing of organizations continues all the way down to the 80th
line.

3) Up to six organizations can be grouped together in one "block". For
example, you can have an organization name on up to 6 consecutive lines
(e.g., the 5th, 6th, 7th, 8th, 9th, and 10th lines). But if there is a
seventh organization there has to be a blank line seperating the 6th
and 7th organizations. All organizations in a "block" must also be of
the same type (public vs. private). If, for example, you have three
public organizations in a state, they can all be listed together in the
same block but if the remaining organizations in the state are private,
there should be a blank line after the third public organization, then
a line with a "Private" header, and then a listing of the private
organizations starting on the next line after that.

4) When you reach the last organization in a state, there should be a
blank line on the next line, then the next state's name on the
following line, then another blank line on the line after that,
followed by a header line indicating "Public" or "Private"
organization.

5) The last 4 lines (of the 80 lines on each page) can't be a line
containing a state name header. The last two lines of the 80 lines
can't be a line indicating type of organization (public or private).
The last line of each page must be an organization name.

Is it possible to create a program in SAS that can go through the
dataset and tell me, based on the rules above, which organization name
should be on the last line of each page? I'm guessing there has to be
some way to keep track, knowing the number of private and public
organizations in each state and following the formatting rules above,
of which organization is placed on the last line of each page. I know
that multiple "counters" would be involved but I'm not exactly sure how
to organize this all to make it work.

If someone could help me with this, it would be vey much appreciated!

Julie
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with page break in PROC REPORT tenny kurian Newsgroup comp.soft-sys.sas 0 03-12-2008 04:01 AM
page break anjalyrn@gmail.com Newsgroup comp.soft-sys.sas 0 03-11-2008 07:05 AM
Page break algorithm in SAS? oseithedude@gmail.com Newsgroup comp.soft-sys.sas 1 12-14-2005 12:04 PM
Re: Page break algorithm in SAS? nospam@HOWLES.COM (Howard Schreier Newsgroup comp.soft-sys.sas 0 12-14-2005 03:26 AM
Re: force page break in excel through ods... David L. Cassell Newsgroup comp.soft-sys.sas 0 04-14-2005 10:46 PM



All times are GMT. The time now is 06:22 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.