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 (March 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 21 Mar 2000 17:12:10 +0100
Reply-To:   detecsm_hellriegelg@WESTLB.DE
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Gehard Hellriegel <detecsm_hellriegelg@WESTLB.DE>
Subject:   Re: How to Re-code this
Content-type:   text/plain; charset=us-ascii

read sexe as $2. instead of 8. If it is not 2 bytes (in your program it is 8) just read it with $8. You can also try sexe:$2. which reads character seperated (at least 1 blank) For your other variables you should take a format:

FORMAT famille 4. z_rta 8.5;

If you want to convert a numeric (sexe) variable to chracter without rereading the dataset, you can also use the PUT - function.

barrere bendia <bendiabarre@ALTAVISTA.COM> on 21.03.2000 16:59:21

Bitte antworten an barrere bendia <bendiabarre@ALTAVISTA.COM>

An: SAS-L@LISTSERV.UGA.EDU Kopie: (Blindkopie: DeTeCSM HellriegelG/D/ExternalStaff/WLB) Thema: How to Re-code this

Hi. Can some one help me ? I read from disk floppy(A) the 3 variables with following program:

LIBNAME mlwin 'C:\SAS\dossier'; DATA mlwin.anticipe; INFILE 'A:\anticipe.txt'; input famille 8. sexe 8. z_rta 8. ; run;

But now I want to change the format in labrairie for the 3 variables. Exactely, I want to change: famille in 4 integer sexe in 2 character and z_rta in 8.5 (for numeric) Please how to do?

____________________________________________________________________

For the largest MP3 index on the Web, go to http://mp3.altavista.com

____________________________________________________________________

Mit freundlichen Gruessen

DeTeCSM, Gerhard Hellriegel

WestLB Abteilung: 001-80622 Aderstr. 22 D - 40217 Duesseldorf Tel.: +49211 826 6173 Fax: +49211 826 5393


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