| Date: | Sat, 23 Jun 2007 11:18:03 -0400 |
| Reply-To: | "Audimar P. Bangi" <audi@SAS2THEMAX.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Audimar P. Bangi" <audi@SAS2THEMAX.COM> |
| Organization: | sas2themax |
| Subject: | Re: use data set |
| In-Reply-To: | <200706231339.l5NAkU8D010751@mailgw.cc.uga.edu> |
| Content-Type: | text/plain; format=flowed; charset="iso-8859-1";
reply-type=original |
I really find it difficult to read a post (especially a one liner-response
embedded in a very long original message) with the quoted original message
not properly trimmed or snipped. I would prefer having the response
statements first, followed by the quoted (and properly trimmed) original
message. Or if responding to several statements in the original message, the
trimmed quoted statement can come first, followed by the specific response
for that statement -- in quoted-response pairs.
Just my personal preference.
Audi
----- Original Message -----
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
To: <SAS-L@LISTSERV.UGA.EDU>
Sent: Saturday, June 23, 2007 9:39 AM
Subject: Re: use data set
> On Sat, 23 Jun 2007 14:54:39 +0200, Robert Bardos <bardos2@ANSYS.CH>
> wrote:
>
>>Hi, and welcome to SAS-L!
>>
>>if you want numeric variables then you have to read (i.e. INPUT)
>>them accordingly. The $ sign in front of the column positions
>>instructs SAS to read those fields into character variables.
>>
>>You want S,D,F as numeric variables, so make that
>>
>> INPUT A $1-3 S 4-6 D 7-9 F 10-12;
>>
>>Next you need to help us so that we can help you. What do you mean
>>by "only use data step please"? A single data step solution? A
>>solution involving two or more data steps? What prohibits the use
>>of procedures here?
>>
>>Sounds like an exam question and many of us here on SAS-L have
>>made it a habit to reply in the spirit of the Chinese(?) proverb
>>"Give a man a fish and you feed him for a day. Teach a man to fish
>>and you feed him for a lifetime."
>>
>>So take this little piece of advice and write back to SAS-L
>>showing what you attempted and where you failed.
>>
>>BTW (by the way), did you know that most of SAS's documentation is
>>available for free via the internet?
>> Check http://support.sas.com/documentation/onlinedoc/
>>
>>
>>Kind regards
>>
>>Robert Bardos
>>Ansys AG, Zurich, Switzerland
>>
>>
>>
>>> -----Urspruengliche Nachricht-----
>>> mcgrathsas@GMAIL.COM
>>> Gesendet: Samstag, 23. Juni 2007 12:28
>>>
>>>
>>> DATA SSK;
>>> INFILE CARDS TRUNCOVER ;
>>> INPUT A $1-3 S $4-6 D $7-9 F $10-12;
>>> CARDS;
>>> QW 12 14 11
>>> ER 2
>>> GD 35 12
>>> ;
>>> RUN;
>>> I WANT TO CHANGE CHARECTER VARIABLE S,D,F TO NUMERIC VARIABLE
>>> AND SUM OF S,D,F
>>>
>>> onlu use data step please help me ..
>>>
>>> I.E I WANT OUTPUT LOOK LIKE IS
>>>
>>> A S D F
>>> 47 14 25
>>>
>>> AND TO FIND PERENATGE ALSO I.E
>>>
>>> S--VARAIBLE DEIVIDEDED BY 10 I.E 47/10*100
>>>
>>> D--VARAIBLE DEIVIDEDED BY 13 I.E 14/13*100
>>>
>>>
>>> F--VARAIBLE DEIVIDEDED BY 17 I.E 25/17*100
>
>
> What is the source of these divisors (10, 13, 17)?
>
>
>>>
>>>
>>> FINALLY I WANT OUTPUT LIKE AS
>>>
>>> A S D F
>>> 47( %) 14(%) 25( %)-sum
>>> QW 12 14 11
>>> ER 2
>>> GD 35 12
>>>
>>>
>>>
>>> Thanku advance
>>>
>>>
>
|