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 (October 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 16 Oct 2008 12:22:29 -0700
Reply-To:     jamesgreen55@YAHOO.CA
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         jamesgreen55@YAHOO.CA
Organization: http://groups.google.com
Subject:      Re: insert leading blank spaces
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On Oct 16, 2:23 pm, ya.hu...@AMYLIN.COM (Ya Huang) wrote: > You need to turn on the 'ASIS' option is style: > > data c; > set sashelp.class; > length newname $30; > if mod(_n_,2)=0 then newname=' '||name; > else newname=name; > run; > > ods rtf file="c:\temp\junk.rtf"; > > proc print data=c style(column)=[asis=on]; > run; > > ods rtf close; > > > > On Thu, 16 Oct 2008 11:11:09 -0700, maverick2 <phekuch...@GMAIL.COM> wrote: > >This works only partially. > > In SAS 9.1, this method gives blanks in the output window within SAS, > >but doesn't retain it in the RTF output. eg. > > >ods rtf file = "pathname\filename.rtf"; > >proc print data = x; > >run; > >ods rtf close; > > >My main concern is getting the blanks in the RTF output. Can this be > >done? > > >On Oct 16, 10:14 am, ms...@albany.edu (Mike Zdeb) wrote: > >> hi ... add a format ... $char will retain the leading blanks > > >> data x; > >> name0 = 'MIKE'; > >> name1 = ' ' || 'MIKE'; > >> name2 = ' ' || 'MIKE'; > >> format name2 $char10.; > >> run; > > >> Obs name0 name1 name2 > >> 1 MIKE MIKE MIKE > > >> -- > >> Mike Zdeb > >> U@Albany School of Public Health > >> One University Place > >> Rensselaer, New York 12144-3456 > >> P/518-402-6479 F/630-604-1475 > > >> > I need to insert leading spaces in a variable. How can I do that? > >> > I have tried the following but it doesn?t work. > > >> > name1 = " "||name; > > >> > If I use SAS 9.1, then I can see the spaces in the variable name1 (in > >> > the dataset), but they go away when I use ODS RTF or even proc print > >> > for that matter. > >> > And when I use Enterprise Guide, I can?t even see the spaces in the > >> > dataset. > > >> > Anyway, I want to retain the leading blanks in my RTF output. How can > >> > I do that?- Hide quoted text - > > >> - Show quoted text -- Hide quoted text - > > - Show quoted text -

This will help I think;

Usage Note 23332: How can I keep the leading and trailing blank spaces in my ODS HTML titles and footnotes?

http://support.sas.com/kb/23/332.html


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