BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cruise
Ammonite | Level 13

Hi guys, 

 

I have the list  of ZIP codes originally categorized to PUP, VAT, CAT and OTHER. Individual ZIP codes in each category is not mutually exclusive. Eventually, I will have to redefine the list to PUP-only, VAT-only, CAT-only and OTHER-only and, PUP-VAT. CAT and OTHER supposed to be mutually exclusive but I have to confirm that as well. 

Someone had a similar problem solved below. However, he/she had equal number of rows versus the list in each category in my case is not the same. 

 

Any hints are appreciate! 

Thanks in advance. 

 

 https://communities.sas.com/t5/SAS-Data-Management/How-do-I-define-and-count-mutually-exclusive-grou...

 

DATA Z.A; 
PUP= (10510 10511 10516 10519 10522 10524 10533 10548 10562 10567 10591 10701 10702 10703 10705 10801 10911 10920 10927 10928 10964 10976 10986 10989 10993
10996 11756 11778 12015 12043 12047 12057 12077 12118 12121 12143 12154 12156 12158 12173 12192 12202 12204 12207 12414 12487 12489 12493 12507 12520 12526 12542
12547 12571 12572 12580 12583 12801 12809 12831 12834 12839 12871 12883 12901 12946 12949 12957 13084 13215 13217 13322 13328 13676 13733 13843 14024 14057 14110 14204
14214 14218 14724 14870 14904 10520 10566 10706 10926 10960 10968 10980 10994 11040 11542 11590 11735 11801 11978 12033 12051 12123 12144 12170 12180 12182 12183 12188
12189 12205 12302 12309 12345 12401 12466 12477 12501 12508 12528 12534 12538 12550 12553 12563 12590 12601 12602 12803 12828 12866 12903 12962 13041 13057 13069 13078
13088 13115 13126 13136 13204 13209 13210 13212 13221 13323 13340 13350 13413 13441 13491 13502 13503 13601 13619 13658 13662 13669 13801 13833 13838 13858 13903 13905
14027 14048 14086 14098 14103 14105 14107 14120 14134 14150 14202 14206 14207 14210 14211 14215 14225 14240 14303 14304 14420 14422 14432 14433 14606 14624 14727 14739
14845 14901 14903)
VAT= ( 10504 10505 10506 10509 10512 10543 10550 10551 10595 10604 10901 10914 10924 10940 10954 10962 10965 10973 10977 10988 10990 11010 11020 11021 11042 11050
11501 11520 11530 11545 11547 11550 11552 11557 11566 11572 11575 11581 11702 11704 11706 11714
11717 11722 11726 11729 11731 11741 11747 11752 11757 11758 11776 11780 11788 11791 11793 11798
11803 11804 11901 11937 11952 11963 11967 11968 12010 12020 12025 12061 12062 12078 12085 12089
12095 12150 12151 12175 12176 12185 12198 12208 12212 12303 12305 12306 12422 12423 12440 12462
12482 12498 12514 12518 12524 12543 12546 12561 12564 12569 12570 12578 12589 12603 12764 12771
12887 12919 12921 12933 12958 13021 13027 13045 13066 13072 13073 13082 13120 13138 13148 13152
13155 13160 13163 13165 13166 13206 13208 13213 13214 13316 13357 13365 13367 13431 13440 13460
13492 13493 13495 13501 13602 13630 13653 13732 13748 13760 13790 13795 13812 13827 13844 13850 13902 13904 14001 14009 14020 14043 14052 14059 14065 14066 14070 14092 14094 14101 14108 14131 14132 14173 14203 14205 14213 14217 14220 14221 14227 14302 14305 14411 14423 14424 14427 14429 14437 14441 14443 14445 14454 14470 14482 14485 14502 14518 14527 14541 14548 14559 14564 14568 14569 14580 14589 14607 14610 14611 14613 14615 14620 14623 14701 14731 14733 14738 14745 14755 14760 14810 14813 14826 14840 14843
14850 14882 14891 14895)
OTHER= (10573 10931 10941 10987 11002 11763 11786 11972 11973 11980 12072 12075 12171 12491 12568 12746 12788 13077 13094 13131 13461 13783 13787 13820 14062 14172 14208 14209 14450 14456 14468 14488 14534 14650 14714 14722 14803 14830 14858 14902 )
CAT= (06390 10501 10502 10507 10514 10518 10523 10526 10527 10528 10530 10532 10535 10536 10537 10538 10541 10546 10547 10549 10552 10553 10560 10570 10576 10577 10578 10579 10580 10583 10588 10589 10590 10594 10597 10598 10601 10603 10605 10606 10607 10704 10707 10708 10709 10710 10803 10804 10805 10913 10916 10917 10918 10919 10921 10923 10925 10930 10950 10952 10956 10958 10963 10969 10970 10974 10975 10983 10984 10985 10992 10998 11001 11003 11005 11023 11024 11030 11507 11509 11510 11514 11516 11518 11548 11553 11554 11558 11559 11560
11561 11563 11565 11568 11570 11576 11577 11579 11580 11596 11598 11701 11703 11705 11709 11710 11713 11715 11716 11718 11719 11720 11721 11724 11725 11727 11730 11732 11733 11738 11740 11742 11743 11746 11751 11753 11754 11755 11762 11764 11765 11766 11767 11768 11769 11770 11771 11772 11777 11779 11782 11783 11784 11787 11789 11790 11792 11794 11795 11796 11797 11933 11934 11935 11939 11940 11941 11942 11944 11946 11948 11949 11950 11951 11953 11954 11955 11957 11958 11961 11964 11965 11971 11976 11977 12007 12008 12009 12017 12018 12019 12022
12023 12024 12027 12028 12029 12031 12032 12035 12036 12037 12041 12042 12046 12052 12053 12054 12056 12058 12059 12060 12064 12065 12066 12067 12068 12070 12071 12074 12076 12083 12084 12086 12087 12090 12092 12093 12094 12106 12108 12110 12115 12116 12117 12120 12122 12125 12130 12131 12134 12136 12137 12138 12139 12140 12147 12148 12149 12153 12155 12157 12159 12160 12164 12165 12166 12167 12168 12169 12184 12186 12187 12190 12193 12194 12196 12197 12203 12206 12209 12210 12211 12304 12307 12308 12404 12405 12406 12407 12409 12410 12411 12412
12413 12416 12418 12419 12421 12424 12427 12428 12430 12431 12433 12435 12439 12442 12443 12444 12446 12448 12449 12450 12451 12454 12455 12456 12457 12458 12460 12461 12463 12464 12465 12468 12469 12470 12472 12473 12474 12480 12481 12484 12485 12486 12492 12494 12495 12496 12502 12503 12513 12515 12516 12517 12521 12522 12523 12525 12529 12531 12533 12540 12545 12548 12549 12566 12567 12575 12577 12581 12582 12585 12586 12592 12594 12701 12719 12720 12721 12723 12725 12726 12727 12729 12732 12733 12734 12736 12737 12738 12740 12741 12742 12743 12745
12747 12748 12750 12751 12752 12754 12758 12759 12760 12762 12763 12765 12766 12768 12770 12775 12776 12777 12779 12780 12782 12783 12786 12787 12789 12790 12791 12792 12804 12808 12810 12812 12814 12815 12816 12817 12819 12821 12822 12823 12824 12827 12832 12833 12835 12836 12837
12838 12842 12843 12844 12845 12846 12847 12849 12850 12851 12852 12853 12854 12855 12857 12858 12859 12860 12861 12863 12865 12870 12873 12878 12885 12886 12910 12911 12912 12913 12914 12916 12917 12918 12920 12923 12924 12926 12928 12930 12932 12934 12935 12936 12937 12941 12942 12943 12944 12945 12950 12952 12953 12955 12956 12959 12960 12961 12964 12965 12966 12967 12969 12970 12972 12973 12974 12978 12979 12980 12981 12983 12985 12986 12987 12989 12992 12993 12996 12997 13026 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13039 13040
13042 13044 13052 13053 13054 13060 13061 13063 13068 13071 13074 13076 13080 13081 13083 13090 13092 13101 13103 13104 13108 13110 13111 13112 13114 13116 13118 13122 13124 13132 13135 13140 13141 13142 13143 13144 13145 13146 13147 13156 13158 13159 13164 13167 13202 13203 13205 13207 13211 13219 13224 13301 13302 13303 13304 13308 13309 13310 13314 13315 13317 13318 13319 13320 13324 13325 13326 13327 13329 13331 13332 13333 13334 13335 13337 13338 13339 13342 13343 13345 13346 13348 13353 13354 13355 13360 13361 13363 13368 13402 13403 13406
13407 13408 13409 13411 13415 13416 13417 13418 13420 13421 13424 13425 13428 13433 13437 13438 13439 13450 13452 13454 13456 13459 13464 13468 13469 13470 13471 13473 13475 13476 13477 13478 13480 13482 13483 13485 13486 13488 13489 13490 13494 13605 13606 13607 13608 13611 13612 13613 13614 13616 13617 13618 13620 13621 13622 13624 13625 13626 13633 13634 13635 13636 13637 13638 13639 13640 13642 13646 13648 13650 13652 13654 13655 13656 13659 13660 13661 13665 13666 13667 13668 13670 13672 13673 13675 13679 13680 13681 13682 13684 13685 13687
13690 13691 13693 13694 13695 13696 13697 13730 13731 13734 13736 13739 13740 13743 13744 13746 13750 13751 13752 13753 13754 13755 13756 13757 13775 13776 13777 13778 13780 13782 13786 13788 13796 13797 13802 13803 13804 13806 13807 13808 13809 13810 13811 13813 13815 13825 13826 13830 13832 13834 13835 13839 13841 13842 13849 13856 13859 13861 13862 13863 13864 13865 13901 14004 14005 14006 14008 14011 14012 14013 14025 14026 14028 14030 14031 14032 14033 14034 14036 14037 14039 14040 14041 14042 14047 14051 14054 14055 14058 14060 14063 14067
14068 14069 14072 14075 14080 14081 14082 14083 14085 14091 14102 14111 14113 14125 14127 14129 14136 14138 14139 14141 14143 14145 14167 14170 14171 14174 14201 14212 14216 14219 14222 14223 14224 14226 14228 14301 14410 14414 14415 14416 14418 14425 14428 14435 14462 14464 14466
14467 14469 14471 14472 14475 14476 14477 14478 14480 14481 14487 14489 14504 14505 14506 14507 14510 14512 14513 14514 14516 14517 14519 14521 14522 14525 14526 14530 14532 14533 14536 14543 14544 14545 14546 14550 14551 14555 14560 14561 14571 14572 14586 14590 14591 14604 14605 14608 14609 14612 14614 14616 14617 14618 14619 14621 14622 14625 14626 14706 14708 14709 14710 14711 14712 14715 14716 14717 14718 14719 14721 14723 14726 14728 14729 14735 14736 14737 14740 14741 14743 14744 14747 14748 14750 14753 14754 14757 14767 14769 14770 14772 14775
14777 14779 14781 14782 14784 14787 14801 14802 14804 14805 14806 14807 14808 14809 14812 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14836 14837 14838 14839 14841 14842 14846 14847 14853 14855 14859 14860 14861 14864 14865 14867 14869 14871 14872 14873 14874 14877 14878 14879 14880 14881 14883 14884 14885 14886 14889 14892 14894 14897 14898 14905 )

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @Cruise,

 

My understanding was that the four lists of ZIP codes are assumed to be "not mutually exclusive." In this situation it's a common task to distinguish between the various possible combinations of memberships (like "ZIP codes in both PUP and VAT, but not in CAT or OTHER"). To obtain this information I would create four datasets, say ZPUP, ZVAT, ZOTH and ZCAT, containing the ZIP codes of the four categories, sorted by ZIP code and free of duplicates (e.g. use PROC SORT with NODUPKEY option). Then it's easy to combine the membership information:

data comb;
merge zpup(in=a)
      zvat(in=b)
      zoth(in=c)
      zcat(in=d);
by zip;
ipup=a;
ivat=b;
ioth=c;
icat=d;
run;

proc freq data=comb;
tables ipup*ivat*ioth*icat / list;
run;

Using your data I got this PROC FREQ output:

                                                         Cumulative    Cumulative
ipup    ivat    ioth    icat    Frequency     Percent     Frequency      Percent
---------------------------------------------------------------------------------
   0       0       0       1         986       68.05           986        68.05
   0       0       1       0          40        2.76          1026        70.81
   0       1       0       0         228       15.73          1254        86.54
   1       0       0       0         195       13.46          1449       100.00

Obviously, the four categories are disjoint, i.e., they don't overlap at all. (Otherwise, combinations like "1 1 0 0" etc. would occur.)

 

View solution in original post

16 REPLIES 16
novinosrin
Tourmaline | Level 20

Good morning @Cruise  haven't had my coffee yet. Can you plz explain your requirement/objective. 

Cruise
Ammonite | Level 13

@novinosrin @ballardw

 

The data WANT should have each categories with exclusive values plus additional variable(s) named after the combination variables such as PUP_VAT.

CAT and OTHER categories supposed to have unique exclusive values. In contrast, PUP and VATvariables supposed to have some overlapping values which should be redefined to PUP_ONLY, VAT_ONLY AND PUP_VAT. However, I still have to confirm whether values in CAT and OTHER categories are unique and exclusive. The same applies to PUP and VAT. These two supposed to have overlapping values but still have to explore and confirm if that's true. The shape and form of data WANT doesn't have to be the same as shown in the demo below. It can also be simply the list of all ZIP-codes but associated with marker variable, for example, PUP_ONLY, PUP-VAT et.c. 

 

Hope this clarifies @novinosrin? or even more confusing now? 🙂 Thanks for asking.  

 

HAVE          WANT        
PUP VAT CAT OTHER   PUP_ONLY VAT_ONLY CAT_ONLY OTHER_ONLY PUP_VAT
12003 12003 12000 14023   12203 15632 12000 14023 12003
12203 15632 13000 13231   12155 16235 13000 13231 12321
12155 16235 14000     13012 12032 14000    
13012 12032 15000     10000   15000    
10000 12321 16000     10916   16000    
10916   17000     10276   17000    
12321         10203        
10276                  
10203                  
ballardw
Super User

Provide data in the form of a data step.

This marks each value of the original variables with a variable containing the combination of variables that it occurs in. I did not explicitly add an "only" though that could be done.

data have;
input PUP VAT CAT OTHER  ;
datalines;
12003 12003 12000 14023 
12203 15632 13000 13231  
12155 16235 14000    . 
13012 12032 15000    .
10000 12321 16000    .
10916 .     17000    .
12321 .  .  .
10276 .  .  .     
10203 .  .  .    
;
run;

data trans;
   set have;
   array v  PUP VAT CAT OTHER;
   length type $ 10.;
   do i= 1 to dim(v);
      if not missing(v[i]) then do;
         ZIP=v[i];
         type = vname(v[i]);
         output;
      end;
   end;
   keep type ZIP;
run;
proc sort data=trans;
  by ZIP;
run;

proc transpose data=trans out=retrans (drop=_name_)
    delimiter=_;
   by ZIP;
   var type;
run;
data want;
   set retrans;
   array c col: ;
length combo $ 20; combo= catx('_',of c(*)); drop col: ; run;
ballardw
Super User

How are you using these? The "code" shown doesn't really provide much (and is syntactically incorrect for what is shown)

 

It might be that you are looking for either formats or a multilabel format if you are looking for something that will examine the value of a variable containing values and return something like "is in PUP list" "is not in PUP list".

 

Multilabel format only work in a few procedures but can handle "overlapping" values of certain types.

Example:

/* To demonstrate how the order of definition affects appearance in
   multilabel formats. Also appearance options to show the spaces to
   get the indent as desired and fix column widths.
   And investigate whether class level format based style overrides work
with MLF in proc tabulate.  Result: NO.
*/
proc format library=work;
value accidentl (multilabel notsorted)
1-5 = 'Accidents'
1-3 = ' Transport accidents'
1 = '   Motor vehicle accidents'
2 = '   Water, air, and space'
3 = '   Other land transport accidents'
4-5 = ' Nontransport accidents'
5 = '   Fishing'
;
value accidentr (multilabel notsorted)
1-5 = 'Accidents'
1-3 = ' Transport accidents'
4-5 = ' Nontransport accidents'
1 = '   Motor vehicle accidents'
2 = '   Water, air, and space'
3 = '   Other land transport accidents'
5 = '   Fishing'
;
value accidents (multilabel notsorted)
1 = '   Motor vehicle accidents'
2 = '   Water, air, and space'
3 = '   Other land transport accidents'
5 = '   Fishing'
1-5 = 'Accidents'
1-3 = ' Transport accidents'
4-5 = ' Nontransport accidents'
;
value mf
1 = "Male"
2 = "Female"
;
value mycolor
1='white'
2='red'
3='green'
4='blue'
5='orange'
6='purple'
;
value accsimple
1 = 'Motor vehicle accidents'
2 = 'Water, air, and space'
3 = 'Other land transport accidents'
4 = 'Nontransport accidents'
5 = 'Fishing'
;
value MyColorl (multilabel notsorted)
1-5 = 'white'
1-3 = 'red'
1 = 'blue'
2 = 'orange'
3 = 'pink'
4-5 = 'purple'
5 = 'black'
;
run;

/* populate a dataset to display */
/* This specifically does NOT generate any data for FISHING above*/
/* to display the behavior of the options below in those cases. */
data junk; 
do i=1 to 50;
type = round(4*ranuni(1234)+.5);
sex = round(2*ranuni(3455)+.5);
output;
end; 
run;


/* Notice that before we get here the data is NOT sorted */
/* in any manner!!!! */
title 'Option Order=Data Preloadfmt Printmiss Misstext=0 format accidentl';
proc tabulate data=junk order=data ;
   class type / mlf PRELOADFMT;
   /*ASIS preserves the leading spaces in the format, Cellwidth here is optional
     for this demo. These will ONLY affect ODS output such as HTML, RTF or PDF
     not the OUTPUT window
  */
   classlev type/ style=[asis=on cellwidth=1.5in];
   class sex;
   /* the formatted values of SEX normally take up different lengths, this fixes
      the column widths to be the same for both headers. May cause interesting
      appearances with large numbers of displayed digits if requested in formats*/
   classlev sex/ style=[cellwidth=.5in];
   /* to get the ALL to have the same width as SEX need to specify this way*/
   table type=' ', all='Total'*{style=[cellwidth=.5in]}*n=' '*f=comma9. sex=' '*n=' '*f=comma8.
   / printmiss misstext='0';
   format type accidentl. sex mf.;
run;title;

title 'Option simple format and classlev background color';
proc tabulate data=junk order=data ;
   class type / ;
   /*ASIS preserves the leading spaces in the format, Cellwidth here is optional
     for this demo. These will ONLY affect ODS output such as HTML, RTF or PDF
     not the OUTPUT window
  */
   classlev type/ style=[asis=on cellwidth=1.5in background=mycolor.];
   class sex;
   /* the formatted values of SEX normally take up different lengths, this fixes
      the column widths to be the same for both headers. May cause interesting
      appearances with large numbers of displayed digits if requested in formats*/
   classlev sex/ style=[cellwidth=.5in];
   /* to get the ALL to have the same width as SEX need to specify this way*/
   table type=' ', all='Total'*{style=[cellwidth=.5in]}*n=' '*f=comma9. sex=' '*n=' '*f=comma8.
   / row=float misstext='0';
   format type accsimple. sex mf.;
run;title;

title 'Option Order=Data Preloadfmt Printmiss Misstext=0 format accidentl classlev background';
proc tabulate data=junk order=data;
   class type / mlf PRELOADFMT;
   classlev type/ style=[asis=on cellwidth=1.5in background=mycolor.];
   class sex;
   classlev sex/ style=[cellwidth=.5in];
   table type=' ', all='Total'*{style=[cellwidth=.5in]}*n=' '*f=comma9. sex=' '*n=' '*f=comma8.
   / printmiss misstext='0';
   format type accidentl. sex mf.;
run;title;
title 'Option Order=Data Preloadfmt Printmiss Misstext=0 format accidents';
proc tabulate data=junk order=data;
   class type / mlf PRELOADFMT;
   classlev type/ style=[asis=on cellwidth=1.5in];
   class sex;
   classlev sex/ style=[cellwidth=.5in];
   table type=' ', all='Total'*{style=[cellwidth=.5in]}*n=' '*f=comma9. sex=' '*n=' '*f=comma8.
   / printmiss misstext='0';
   format type accidents. sex mf.;
run;title;
 

FreelanceReinh
Jade | Level 19

Hi @Cruise,

 

My understanding was that the four lists of ZIP codes are assumed to be "not mutually exclusive." In this situation it's a common task to distinguish between the various possible combinations of memberships (like "ZIP codes in both PUP and VAT, but not in CAT or OTHER"). To obtain this information I would create four datasets, say ZPUP, ZVAT, ZOTH and ZCAT, containing the ZIP codes of the four categories, sorted by ZIP code and free of duplicates (e.g. use PROC SORT with NODUPKEY option). Then it's easy to combine the membership information:

data comb;
merge zpup(in=a)
      zvat(in=b)
      zoth(in=c)
      zcat(in=d);
by zip;
ipup=a;
ivat=b;
ioth=c;
icat=d;
run;

proc freq data=comb;
tables ipup*ivat*ioth*icat / list;
run;

Using your data I got this PROC FREQ output:

                                                         Cumulative    Cumulative
ipup    ivat    ioth    icat    Frequency     Percent     Frequency      Percent
---------------------------------------------------------------------------------
   0       0       0       1         986       68.05           986        68.05
   0       0       1       0          40        2.76          1026        70.81
   0       1       0       0         228       15.73          1254        86.54
   1       0       0       0         195       13.46          1449       100.00

Obviously, the four categories are disjoint, i.e., they don't overlap at all. (Otherwise, combinations like "1 1 0 0" etc. would occur.)

 

novinosrin
Tourmaline | Level 20

Hi @Cruise is your HAVE very large and wide ? If yes, I would feel embarrassed to post my solution and now that leads/compels me to think deeper to nail an efficient one(which i will try perhaps after lunch). IF it is not too large and wide, I don't mind dealing with embarrassment and still posting a rather long solution-->

 

data have;
input PUP	VAT	CAT	OTHER;
cards;
12003	12003	12000	14023
12203	15632	13000	13231
12155	16235	14000	.
13012	12032	15000	.
10000	12321	16000	.
10916	.	17000	.
12321	.	.	.
10276	.	.	.
10203	.	.	.
;

proc transpose data=have out=_have;
by _all_ notsorted;
var _all_;
run;

proc sort data=_have(where=(col1 ne .) keep=_name_ col1) out=__have;
by col1 _name_;
run;

data temp(drop=_name_);
length name $30;
call missing(name);
do until(last.col1);
set __have;
by col1;
name=catx('_',name,_name_);
end;
do until(last.col1);
set __have;
by col1;
output;
end;
run;

proc sort data=temp out=_temp noduprecs;
by name col1;
run;

proc transpose data=_temp out=w;
by name notsorted;
var col1;
run;

proc transpose data=w out=want(drop=_:);
var col:;
id name;
run;

 

Found a nit:

data temp(drop=_name_);
length name $30;
call missing(name);
do until(last.col1);
set __have;
by col1;
name=catx('_',name,_name_);
end;
/*do until(last.col1);*/
/*set __have;*/
/*by col1;*/
/*output;*/
/*end;*/
run;

The datastep part above had double DOW previously as you may have seen , and I don't think that's needed, so have commented that out 

Cruise
Ammonite | Level 13

@novinosrin

the data HAVE is posted in my original post. It has in total around 900 ZIP codes. that's it. not a large data. 

novinosrin
Tourmaline | Level 20

Thank you*900 lol Merci. Enjoy!!!!!! 

Cruise
Ammonite | Level 13

so when you LOL 🙂 you mean it's quite small data, right?

novinosrin
Tourmaline | Level 20

toooooooooooooooooooooo small 🙂

 

 

I was preparing for a minimum of 42,000 ZIP Codes

 

As of 2015, there were over 42,000 ZIP Codes in the United States. ZIP Codes are used not only for tracking of mail but also in gathering geographical statistics in the United States.
Cruise
Ammonite | Level 13
A LOT TO LEARN FROM YOUR ATTITUDE. YOU'RE THOROUGH!
ballardw
Super User

@novinosrin wrote:

toooooooooooooooooooooo small 🙂

 

 

I was preparing for a minimum of 42,000 ZIP Codes

 

As of 2015, there were over 42,000 ZIP Codes in the United States. ZIP Codes are used not only for tracking of mail but also in gathering geographical statistics in the United States.

And 41232 distinct 5-digit Zipcodes in the SASHELP.ZIPCODE data set shipped with SAS 9.4 (haven't looked for an update yet).

I wonder if the PUP that @Cruise has are related to the ZIP_class values of P and U in that data set.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 16 replies
  • 1902 views
  • 10 likes
  • 4 in conversation