Hi Anaïs.
What you have to do is sort your data set to have the Z observation on the very first observation. Then read the dataset with a DATA step, and
[pre]
RETAIN Zvalue ;
IF _N_=1 THEN Zvalue = value ;
[/pre]
The RETAIN instruction will ensure that the value is remembered for any further observation read.
If there are several values to remember, declare every variable in a single RETAIN, and create them in the IF _N_=1 statement. You can use ARRAYs to simplify syntax, working on week_1, week_2, etc.
Regards.
Olivier