LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 1997, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 Feb 1997 09:12:28 +0500
Reply-To:     Bernard Tremblay <bernard@CAPITALE.QC.CA>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Bernard Tremblay <bernard@CAPITALE.QC.CA>
Subject:      Re: Help: Basic PUT statement
Comments: To: Lei.Rao@PAREXEL.COM

Hi, The problem is that you are using a list output. You aren't specifying the position of any variable, so SAS make the assumption that you want them separated by at least a space. All you'd have to do is to add the position of the first element you're printing and SAS will assume you're not printing a list. Try:

PUT @1 "*" VAR1 "*,* *,*" VAR2 "*,*" VAR3 "*,*" ..... VAR100 "*,* *";

Hope it helps, Bernard Tremblay \\\|/// \\ - - // ( @ @ ) +------oOOo-(_)-oOOo----------+---------------------------------+ | Bernard Tremblay | | | La Capitale | Tel: (418) 646-2401 | | | Fax: (418) 646-5960 | | | Int: bernard@capitale.qc.ca | +-----------------------------+---------------------------------+ | Imaginasys enr | Res: (418) 878-4447 | | | Int: bertrem@quebectel.com | +---------------Oooo----------+---------------------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)

============================================================================= >>>From owner-sas-l@UGA.CC.UGA.EDU Mon Feb 10 17:43 EST 1997 >>>Mime-Version: 1.0 >>>Content-Transfer-Encoding: 7bit >>>Content-Description: cc:Mail note part >>>Date: Mon, 10 Feb 1997 17:35:41 -0500 >>>From: Lei Rao <Lei.Rao@PAREXEL.COM> >>>Subject: Help: Basic PUT statement >>>To: Multiple recipients of list SAS-L <SAS-L@UGA.CC.UGA.EDU> >>> >>> Dear SAS-Ler, >>> >>> I need to create an ascii file from a sas dataset. The code I'm using >>> is: >>> >>> DATA _NULL_; >>> SET A; >>> FILE 'C:\OUT.DAT' NOPRINT LS=1024 LRECL=1024; >>> PUT "*" VAR1 "*,* *,*" VAR2 "*,*" VAR3 "*,*" ..... VAR100 "*,* *"; >>> RUN; >>> >>> The problem is I'm getting a space after each varible. Is there any >>> option I can use to get rid of that space? >>> >>> TIA, >>> Lei


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