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 (September 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 12 Sep 2000 09:02:32 -0700
Reply-To:   "Huang, Ya" <ya.huang@AGOURON.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Huang, Ya" <ya.huang@AGOURON.COM>
Subject:   Re: PROGRAMMING QUESTION
Comments:   To: John Smith <anirdesh@HOTMAIL.COM>
Content-Type:   multipart/alternative;

John,

This is a very good candidate for proc sql:

data xx; input num $ letter $ @@; cards; 1 1 2 A 2 B 2 C 3 D 3 E 3 F 4 G 4 H 4 I 5 J 5 K 5 L 6 M 6 N 6 O 7 P 7 Q 7 R 7 S 8 T 8 U 8 V 9 W 9 X 9 Y 9 Z 0 0 ;

options nocenter;

proc sql; select compress(n1.num||n2.num||n3.num) as dialnum, compress(n1.letter||n2.letter||n3.letter) as dialet from xx n1, xx n2, xx n3 where n1.num='9' and n2.num='1' and n3.num='2' ;

------------------------- The SAS System 08:41 Tuesday, September 12, 2000 7

dialnum dialet --------------------------------------------- 912 W1A 912 X1A 912 Y1A 912 Z1A 912 W1B 912 X1B 912 Y1B 912 Z1B 912 W1C 912 X1C 912 Y1C 912 Z1C

You should be able to modify it to fit 4 digit case.

HTH

Ya Huang

-----Original Message----- From: John Smith [mailto:anirdesh@HOTMAIL.COM] Sent: Tuesday, September 12, 2000 8:17 AM To: SAS-L@LISTSERV.UGA.EDU Subject: PROGRAMMING QUESTION

How many ( unique) times a number can be dialed ?

Let's say if you need to dial 912, it can be dialed as

(1) W1A, W1B, W1C X1A, X1B, Z1C, Y1A, Y1B, Y1C, Z1A, Z1B, Z1C

Let's say if you need to dial 6047, it can be dialed as

(2) M0GP, N0GP, O0GP M0HP, N0HP, O0HP M0IP, N0IP, N0IQ and so on....

Is there a way in SAS to code like this ( It's a combinations) ? 1 (one) & 0 (zero) are itself (it doesn't take any letters).

_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at http://profiles.msn.com.


[text/html]


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