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 (March 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 4 Mar 2002 10:19:17 -0500
Reply-To:     "Elmaache, Hamani" <Hamani.Elmaache@CCRA-ADRC.GC.CA>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Elmaache, Hamani" <Hamani.Elmaache@CCRA-ADRC.GC.CA>
Subject:      Re: reading a matrix with character values with SAS/IML
Comments: To: "Philippe.Guiblin@ONS.GOV.UK" <Philippe.Guiblin@ONS.GOV.UK>
Content-Type: text/plain; charset="iso-8859-1"

Hi Philippe . run this code to see wnate you wante. /********************************/

data data; input Name $2. Color $6. Amount; cards; a black 10 a black 15 a red 20 a red 23 a red 27 b black 10 b black 15 b red 23 b red 27 ; run;

proc iml;

use data; read all var { Amount} into num; read all var {Name Color} into char; read all var {Name Color Amount} into char_num; print num; print char; print char_num; run; quit; /********************************/ /********************************/

Barrere

/**********/

-----Original Message----- From: Philippe Guiblin [mailto:Philippe.Guiblin@ONS.GOV.UK] Sent: March 4, 2002 9:19 AM To: SAS-L@LISTSERV.UGA.EDU Subject: reading a matrix with character values with SAS/IML

dear sas users,

Does anyone know how to read a sas-dataset containing both numeric and character values within sas iml?

I have used the lines below but sas/iml only reads the numeric variables of the sas-dataset mat1and put it into mat1. /*************/ proc iml;

use a.mat1; read all into mat2; /*************/ Thanks.

Philippe Guiblin Office for National Statistics.

For the latest data on the economy and society consult National Statistics at http://www.statistics.gov.uk

********************************************************************** Please Note: Incoming and outgoing email messages are routinely monitored for compliance with our policy on the use of electronic communications ********************************************************************** Legal Disclaimer : Any views expressed by the sender of this message are not necessarily those of the Office for National Statistics **********************************************************************


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