merging all columns in sas dataset who has column "shiyas" in header -


i have sas dataset columns shiyas1,shiyas2,shiyas3 in it. dataset has other columns also. want combine columns header shiyas in it.

we can't use cats(shiyas1,shiyas2,shiyas3) because similar datasets have columns upto shiyas10. generating general sas code, cannot use cats(shiyas1,shiyas2 .... shiyas10).

so how can this?

when tried use cats(shiyas1,shiyas2 .... shiyas10), eventhough dataset have columns upto shiyas3, created columns shiyas4 shiyas10 . filled in them.

so 1 solution combine shiyas till dataset have or delete unnecessary shiyas columns...

pls me.

use variable list.

data have;     input (shiyas1-shiyas3) (:$1.);     cards;  1 2 3  ;  data want;     set have;     length cat_shiyas $ 100 /*large enough hold content*/     ;     cat_shiyas=cats(of shiyas:); run; 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -