LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 16 Sep 2009 07:16:41 -0500
Reply-To:     Carol Bristow <Carol.Bristow@DPRA.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Carol Bristow <Carol.Bristow@DPRA.COM>
Subject:      Re: Simulating a title with the PUT statement XXX
Comments: To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
In-Reply-To:  A<200909161143.n8GAkfmk004522@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

In the days of fixed fonts, when I needed to put out lines of text that couldn't be done as titles or bylines, I computed a location variable by subtracting the length of the text that I wanted to write out from the linesize and divided by two. Something like:

c1 = (linesize - length(textstring) / 2; put @c1 textstring;

I've not had occasion to use this for a while, so I don't know off the top of my head what will happen if you're using proportional fonts, and I don't have time to play to find out.

Carol Bristow DPRA Inc. 1655 N. Ft Myer Dr. Ste925 Arlington, VA 22209 phone: 703-682-2612 fax: 703-528-3100

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Gerhard Hellriegel Sent: Wednesday, September 16, 2009 7:43 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Simulating a title with the PUT statement XXX

if you have something to list, why don't you use a title statement? If you have nothing and want only the title, you must use a char which is not visible, but not blank. I think hex FF or ED (somewhere around that) is something what you could use to force SAS to produce a output.

title "Results for Subpopulation #&I:";

DATA _NULL_; FILE PRINT; PUT "."; PUT ; PUT; RUN;

Gerhard

On Wed, 16 Sep 2009 03:44:34 -0400, Dan Abner <dan.abner99@GMAIL.COM> wrote:

>Hello, > >Does anyone know how to center a character string in the listing and print >it in blue using a PUT statment (In other words, to mimick a title)? > >I have the following DATA step that I use in what I hope will be a >production level macro. Just need this to look like a proper title. I would >rather not call a null PROC step just to get a title to print... > >DATA _NULL_; > >FILE PRINT; > >PUT; PUT "Results for Subpopulation #&I:"; PUT; > >RUN; > >Thanks! > > > >Daniel


Back to: Top of message | Previous page | Main SAS-L page