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 (August 1999, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 3 Aug 1999 16:32:37 -0400
Reply-To:     Edward C Confer <Edward_C_Confer@FLEET.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Edward C Confer <Edward_C_Confer@FLEET.COM>
Subject:      Re: How to get the sub value of the same var
Comments: To: Kathy White <kathyzhi@HOTMAIL.COM>
Content-Type: text/plain; charset=US-ASCII

Add this instead:

bookid1=substr(bookid,1,5) for concatenation var.

______________________________ Reply Separator _________________________________ Subject: How to get the sub value of the same var Author: Kathy White <kathyzhi@HOTMAIL.COM> at Internet Date: 08/03/1999 3:22 PM

I just have the similar problem to Jing liu posted this morning. My problem is to produce the sub-value of the same var, say, I have the following dataset A: A OBS BOOKID 1 A30000 2 A16000 3 A21000 4 Q15400 5 Q34200 6 B17600 7 B23300

As you noted, the last digits of the bookid are all 00. Right now, I want to get 4 sub ids for the same kind of book and keep the same order as in A. Thant means, for each obs in A dataset, produce and chang to 4 more obs with the last two digits is 01, 02, 03, 04. So the expected final dataset should be: B OBS BOOKID 1 A30001 2 A30002 3 A30003 4 A30004 5 A16001 6 A16002 7 A16003 8 A16004 9 A30001 10 A30002 11 A30003 12 A30004 13 A21001 14 A21002 15 A21003 16 A21004 17 Q15401 18 Q15402 19 Q15403 20 Q15404 21 Q34201 22 Q34202 23 Q34203 24 Q34204 25 B17601 26 B17602 27 B17603 28 B17604 29 B23301 30 B23302 31 B23303 32 B23304

Any advice is appreciated. Thanks a million in advance.

Kathy

_______________________________________________________________ Get Free Email and Do More On The Web. Visit http://www.msn.com


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