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 (October 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 11 Oct 1999 20:13:53 GMT
Reply-To:   yzhao@HAAS.BERKELEY.EDU
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   yzhao@HAAS.BERKELEY.EDU
Organization:   Deja.com - Before you buy.
Subject:   create new variable

Hi SAS Experts,

I was trying to create new variables from my old variables. The old variable looks like the following:

var1

AAA H-D LIQ -.25 AAA H-D LIQ BBBBB H-D LIQ CCCC H-D LIQ PP DD H-D LIQ

The value under the variable name var1 has 30 number of bytes, some of them is space. I would like to seperate the value of "var1" into several varibles which will be in the format:

var1 var2 var3 var4 AAA H-D LIQ -0.25

because the would-be-first variable's number of bytes is not fixed (AAA, BBBBB, CCCd, DD...), I found it is difficult for me to do this. Do you have any hints of how to do this?

Thank you very much!

YingZhao

Sent via Deja.com http://www.deja.com/ Before you buy.


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