  Quandle homology theory has been developed and cocycles have been used to
define invariants of oriented classical or surface links. We introduce a
shifting chain map $\sigma$ on each quandle chain complex that lowers the
dimensions by one. By using its pull-back $\sigma^\#$, each $2$-cocycle $\phi$
gives us the $3$-cocycle $\sigma^\# \phi$. For oriented classical links in the
$3$-space, we explore relation between their quandle $2$-cocycle invariants
associated with $\phi$ and their shadow $3$-cocycle invariants associated with
$\sigma^\# \phi$. For oriented surface links in the $4$-space, we explore how
powerful their quandle $3$-cocycle invariants associated with $\sigma^\# \phi$
are. Algebraic behavior of the shifting maps for low-dimensional (co)homology
groups is also discussed.
