Step 1: Observe the coding pattern in the given example:
\[
\text{CAT} \rightarrow C=3,\; A=1,\; T=20 \Rightarrow 3120
\]
Step 2: The code is formed by writing the alphabetical positions of each letter consecutively.
Step 3: Apply the same logic to DOG:
\[
D=4,\; O=15,\; G=7
\]
Step 4: Writing them together:
\[
\boxed{4157}
\]