Aims. We study ten molecular transitions obtained from an unbiased 3 mm molecular line survey using the IRAM 30 m telescope toward 409 compact dust clumps identified by the APEX Telescope Large Area Survey of the Galaxy (ATLASGAL) to understand photodissociation regions (PDRs) associated with the clumps. The main goal of this study is to investigate whether the abundances of the selected molecules show any variations resulting from the PDR chemistry in different clump environments. Methods. We selected HCO, HOC$$^+$$, C$$_2$$H, c-C$$_3$$H$$_2$$, CN, H$$^{13}$$CN, HC$$^{15}$$N, and HN$$^{13}$$C as PDR tracers, and H$$^{13}$$CO$$^+$$ and C$$^{18}$$O as dense gas tracers. By using estimated optical depths of C$$_2$$H and H$$^{13}$$CN and assuming optically thin emission for other molecular transitions, we derived column densities of those molecules and their abundances. To assess the influence of the presence and strength of ultraviolet radiation, we compare abundances of three groups of the clumps: Hii regions, infrared bright non-Hii regions, and infrared dark non-Hii regions. Results. We detected C$$^{18}$$O, H$$^{13}$$CO$$^+$$, C$$_2$$H, c-C$$_3$$H$$_2$$, CN and HN$$^{13}$$C toward most of the observed dust clumps (detection rate > 94%), and H$$^{13}$$CN is also detected with a detection rate of 75%. On the other hand, HCO and HC$$^{15}$$N show detection rates of 32% and 39%, respectively, toward the clumps, which are mostly associated with Hii region sources: detection rates of HCO and HC$$^{15}$$N toward the Hii regions are 66% and 79%. We find that the abundances of HCO, CN, C$$_2$$H, and c-C$$_3$$H$$_2$$ decrease as the H$$_2$$ column density increase, indicating high visual extinction, while those of high density tracers (i.e., H$$^{13}$$CO$$^+$$ and HC$$^{15}$$N) are constant. In addition, N(HCO)/N(H$$^{13}$$CO$$^+$$) ratios significantly decrease as H$$_2$$ column density increase, and in particular, 82 clumps have X(HCO) $$\gtrapprox$$ 10$$^{−10}$$ and N(HCO)/N(H$$^{13}$$CO$$^+$$+) $$\gtrapprox$$ 1, which are the indication of far-ultraviolet (FUV) chemistry. This suggests the observed HCO abundances are likely associated with FUV radiation illuminating the PDRs. We also find that high N(c-C$$_3$$H$$_2$$)/N(C$$_2$$H) ratios found for Hii regions having high HCO abundances ($$\gtrapprox$$ 10$$^{−10}$$) are associated with more evolved clumps with high L$$_{bol}$$/M$$_{clump}$$. This trend might be associated with gain-surface processes, which determine initial abundances of these molecules, and time-dependent effects in the clumps corresponding to the envelopes around dense PDRs and Hii regions. In addition, some fraction of the measured abundances of the small hydrocarbons of the Hii sources can be the result of the photodissociation of PAH molecules.