How to combine multiple datasets into one large one?

Please, can someone help me refine this code. I have all the variables listed and working on projecting volumes base on Actual historical value and comparing the projected value to the Actual and see how close the projection is to the Actual using 20 working day. So we have a data lag of 10working days. So i am using 30days lag to produce 20Observation only by using any date in the past to compare our Actual against our Projected. I am getting error like Variable date not found. Invalid argument to function INPUT It is also given me the entire observation instead of the 20.

data Work1;

set Projection;

date = input(Workday, MMDDYY10.); 

format date date9.;

Var = proj_deps proj_onus_hold proj_guar_hold proj_offus_hold; 

L30 = lag30(Var);

run;

proc print data = Work1(OBS = 20);

var date Var L6;

where date ge '30OCT2021'd; 

run;

/r/sas Thread Parent