Step 1: Understand the conditions of the vector.
The vector has magnitude
\[
|\vec{v}|=3
\]
It makes equal angles with the \(x\)-axis and \(y\)-axis.
Also it is perpendicular to the \(z\)-axis.
Step 2: Use perpendicular condition.
If a vector is perpendicular to the \(z\)-axis, its \(k\)-component must be zero.
Thus the vector is of the form
\[
\vec{v}=a\hat{i}+a\hat{j}+0\hat{k}
\]
because it makes equal angles with \(x\) and \(y\) axes.
Step 3: Use magnitude formula.
\[
|\vec{v}|=\sqrt{a^2+a^2}
\]
\[
3=\sqrt{2a^2}
\]
\[
3=\sqrt{2}\,a
\]
\[
a=\frac{3}{\sqrt{2}}
\]
Step 4: Simplify the vector.
\[
\vec{v}=\frac{3}{\sqrt{2}}\hat{i}+\frac{3}{\sqrt{2}}\hat{j}
\]
Rationalizing denominator:
\[
\frac{3}{\sqrt{2}}=\frac{3\sqrt{2}}{2}
\]
Thus
\[
\vec{v}=\frac{3\sqrt{2}}{2}\hat{i}+\frac{3\sqrt{2}}{2}\hat{j}
\]
Conclusion:
Hence the required vector is
\[
\frac{3\sqrt{2}}{2}\hat{i}+\frac{3\sqrt{2}}{2}\hat{j}
\]
Final Answer: $\boxed{\dfrac{3\sqrt{2}}{2}\hat{i}+\dfrac{3\sqrt{2}}{2}\hat{j}}$