皆様一応当初の目的の疑問が解決出来ましたので報告します.
沢山の方々に教えていただいた結果です,
本当にありがとうございました.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% このプログラムは\labelの位置の深さに関わらず
%章番号のみを出力する.
\documentclass{jsbook}
%これは正しい 2021/12/14
\begin{document}
\makeatletter
% \def\章番号#1{\章番号@#1\@nil}
\def\章番号@#1.#2\@nil{#1}
\def\章番号#1{\章番号@#1.\@nil}
%
\def\chapref#1{\expandafter\@setref\csname r@#1\endcsname\@chapref{#1}}
%\def\@chapref#1#2{ #1から章番号を切り出す処理。#2は捨てる。 }
%\def\@chapref#1#2{\章番号{#1}}
\def\@chapref#1#2{\章番号@#1.\@nil}
\makeatother
%
\章番号{1.1} → 1 \\
%%%
\chapter{C} %第1章
\section{P}
% \label{花子}
\ref{花子} → 2.1 \\
\chapter{Q} %第2章
\section{R}
%
\label{花子}
\chapref{花子}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ここだよ \chapref{花子}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%