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 (December 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 4 Dec 2003 16:06:58 -0500
Reply-To:     Kevin Auslander <kauslander@TERRECRS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Kevin Auslander <kauslander@TERRECRS.COM>
Subject:      Re: leading spaces
Comments: To: Ian Whitlock <WHITLOI1@WESTAT.com>
In-Reply-To:  <DE7408C714122F4BB5221C1E73A135D10E1CDC@remailw2k2.westat.com>
Content-Type: text/plain; charset="iso-8859-1"

Thanks,

I'll remember that one.

-----Original Message----- From: Ian Whitlock [mailto:WHITLOI1@WESTAT.com] Sent: Thursday, December 04, 2003 3:24 PM To: 'Kevin Auslander' Subject: RE: leading spaces

Kevin,

data _null_ ; input line $char20. ; len = length ( line ) ; put line $varying. len "<<" ; cards ; abc ;

IanWhitlock@westat.com

-----Original Message----- From: Kevin Auslander [mailto:kauslander@TERRECRS.COM] Sent: Thursday, December 04, 2003 3:22 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: leading spaces

Thanks, that did the trick for getting the leading spaces into the SAS dataset but they are being dropped again when I output to a text file. My maximum line length is 2000 but most lines are much less than 2000.

put line; Drops leading spaces.

put line $char2000.; Keeps leading spaces but adds trailing spaces.

Is there any way I can keep leading spaces and drop trailing spaces in the output?

Thanks.

Kevin Auslander SAS Programmer TERRE Clinical Research Services, Inc. 24 Frank Lloyd Wright Lobby M PO BOX 382 Ann Arbor, MI 48106 734-663-9030 ext 236

This communication may contain information that is legally privileged, confidential or exempt from disclosure. If you are not the intended recipient, please note that any dissemination, distribution, use or copying of this communication is strictly prohibited. Anyone who receives this message in error should notify the sender immediately by telephone (734.663.9030) or by return e-mail, and delete it from his or her computer.

-----Original Message----- From: Robin & Charmaine Templer [mailto:robin.templer@xtra.co.nz] Sent: Thursday, December 04, 2003 2:43 PM To: Kevin Auslander Subject: Re: leading spaces

use the $CHAR. informat on the input statement.

> > From: Kevin Auslander <kauslander@TERRECRS.COM> > Date: 2003/12/05 Fri AM 08:37:27 GMT+13:00 > To: SAS-L@LISTSERV.UGA.EDU > Subject: leading spaces > > I am writing a SAS program to read a text file into a SAS dataset, > modify some lines in the SAS dataset, and then output back to a text > file. It is working fine accept on lines that have leading spaces. > SAS automatically drops the leading spaces when inputing. Does anyone > know how to tell SAS to > keep leading spaces. TIA > > > Kevin Auslander > > SAS Programmer > > TERRE Clinical Research Services, Inc. > > 24 Frank Lloyd Wright Lobby M > > PO BOX 382 > > Ann Arbor, MI 48106 > > 734-663-9030 ext 236 > > > > This communication may contain information that is legally privileged, > confidential or exempt from disclosure. If you are not the intended > recipient, please note that any dissemination, distribution, use or copying > of this communication is strictly prohibited. Anyone who receives > this message in error should notify the sender immediately by > telephone > (734.663.9030) or by return e-mail, and delete it from his or her computer. >


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