We study the chiral separation and chiral magnetic effects in a slab of Dirac semimetal of finite thickness, placed in a constant magnetic field perpendicular to its surfaces. We utilize the Bogolyubov boundary conditions with a large Dirac mass (band gap) outside the slab. We find that, in a finite thickness slab, the axial current density is induced by helicity-correlated standing waves and, as a consequence, is quantized. The quantization is seen in its stepped-shape dependence on the fermion chemical potential and a sawtooth-shape dependence on the thickness of the slab. In contrast to a naive expectation, there is no chiral charge accumulation anywhere in the bulk or at the boundaries of the semimetal. In the same slab geometry, we also find that a nonzero chiral chemical potential induces no electric current, as might have been expected from the chiral magnetic effect. We argue that this outcome is natural and points to the truly non-static nature of the latter. By taking into account a nonzero electric field of double layer near the boundaries of the slab, we find that the low-energy modes under consideration satisfy the continuity equation for axial current density without the anomalous term.