%let path=/home/student/Demos/intro_to_ds2;
libname demo "&path/data/sasdata";
data demo.raw_data;
	length ID Serial TransactionDate 8;
    format TransactionDate mmddyy10.;
	array IND_[100];
    drop _:;
	call streaminit(12345);
	do ID=1 to 100000;
		TransactionDate=rand('INTEGER','01JAN2020'd,'31DEC2023'd);
		do _I=1 to dim(ind_);
			ind_[_i]=rand('INTEGER',0,1);
		end;
        Serial=1;
		output;
        if rand('uniform') <.0001 then _mult=-1; 
        else mult=1;
		do Serial=2 to RAND('INTEGER',5,20);
            _diff=rand('INTEGER',15,45);
            if rand('uniform') <.1 then _diff=_diff*_mult; 
			TransactionDate=INTNX('DAY',TransactionDate,_diff);
			do _I=1 to dim(ind_);
				ind_[_i]=rand('INTEGER',0,1);
			end;
			output;
		end;
	end;
run;


