| Date: | Tue, 5 Dec 2000 15:15:40 -0500 |
| Reply-To: | Bernard Tremblay <imaginasys@HOTMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Bernard Tremblay <imaginasys@HOTMAIL.COM> |
| Subject: | Re: A very basic PUTting question |
|
| Content-Type: | text/plain; charset=iso-8859-1; format=flowed |
|---|
Hi Chris,
Just format score with Z3.0 format before your put statement:
format score z3.;
put
...
Regards,
\\\|///
\\ - - //
( @ @ )
+-----oOOo-(_)-oOOo--+-----------------------------------+
| Bernard Tremblay | |
| CSST | Tel: (418) 528-9313 |
| | Fax: (418) 528-1493 |
| | Int: Bernard.Tremblay@csst.qc.ca |
+----------------------------+---------------------------+
| Imaginasys enr | Res: (418) 658-1411 |
| | Int: bertrem@videotron.ca |
| | Hot: imaginasys@hotmail.com |
+--------------Oooo--+-----------------------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>From: Chris Smith <cpsmith@AGFINANCE.COM>
>Reply-To: Chris Smith <cpsmith@AGFINANCE.COM>
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: A very basic PUTting question
>Date: Tue, 5 Dec 2000 14:45:33 -0500
>
>I have a score that is 0 to 999 (and is generated as a numeric value). My
>IT people have told me that they need the score in display (char) format,
>left padded with zeros. Is there an easy way to do this if I PUT columns
>as noted below, or do I need to manipulate the variable first using
>functions? If the latter, what functions do I need to use? (I don't see a
>STRING() or LPAD() function a la SPSS.) I appreciate your help. -- Chris
>
>DATA _NULL_;
> SET TAPEDATA.SCORE;
> FILE SCORE;
> PUT COMMENT 1-1
> FLAG 2-2
> CUSTID 3-11
> MODELID 12-13
> TODAY 14-23
> SCORE 24-26 /*Needs to be left padded w zeros if < 100*/
> MANTISSA 25-29;
>RUN;
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
|