Something like this should work. Input it from a text string using your preferred informat.
data lab4.firmy2;
set lab4.firmy;
if first.nazwa then do;
data=input("&datap.",YYMMDD.);
zamkniecie=.;
end;
keep nazwa data zamkniecie;
by nazwa;
How are you interacting with the user (Base SAS or EG)? If you're in EG I think the prompt manager can shortcut some of this for you.