It seems that the \jobname is frozen after the first time it is
expanded, and has some special primitive behaviour up to that point,
that is to say that it is a primitive, not a macro, but which is similar
to a macro containing the token list « undefined » (w/o guillemets) with
all letters of catcode 12 (other). This means that if you do:
\show\jobname
you get (because it is a primitive)
\jobname=\jobname.
if you do:
\let\toto\jobanme\show\toto
you get:
\toto=undefined.
if now you do:
{\escapechar=-1 \edef\titi{\expandafter\string\csname undefined\endcsname}}
\let\toto\jobname
\ifx\titi\toto\message{undefined = string}\else\message{undefined ???}\fi
you get:
undefined = string
if you do:
\ifx\jobname\undefined\message{jn undef}\else\message{jn not undef}\fi
you get:
jn not undef
if you do:
\edef\tata{\jobname}\show\tata
then, assuming that the jobname is helloworld, you get:
\tata=macro:
->hellworld.
if the jobname was « hello world » (w/o the guillemets, but with the
space inside, then you would get:
\tata=macro:
->"hell world".
So, I have one plain question, is there any such thing in \documentclass
or \RequirePackage as \edef\dummy{\jobname} in order to freeze the
jobname.