/****************************************************************************** * Programme : Using COUNT and COUNTC functions * Reference : USINGCFDED * Source : https://www.wearecas.eu/en/sampleCode/USINGCFDED ******************************************************************************/ /* --- BLOC 1 --- */ data _null_ ; long='a b c d a e d a e t g d a c s' ; num_a=countc(long,'a') ; put num_a= ; run ; /* --- BLOC 2 --- */ data _null_ ; long='dog cat rat bat dog camel dingo snake bigdog' ; num_dog=count(long,'dog') ; put num_dog= ; run ;