data WORK.INC1;
infile datalines dsd truncover;
input ENDT:DATE9. STD:DATE9. menu:$4. id:32. day:32. adj:$200. num:$3.;
datalines4;
07NOV2016,02NOV2016,IDEA,10001,,,2
14NOV2016,08NOV2016,IDEA,10001,1,OVER,3
28NOV2016,15NOV2016,IDEA,10001,,,4
14SEP2016,29NOV2016,IDEA,10001,,,5
;;;;
In the above test data if i have adj="OVER" then i need to create a new record before it i.e in example it is num=3 which has OVER. I need to create num=2 and
minus number of day in num=2 whci has 07nov2016(end-day) and new record as
07NOV2016,07NOV2016,IDEA,10001,,OVER,2
data WORK.INC12;
infile datalines dsd truncover;
input ENDT:DATE9. STD:DATE9. menu:$4. id:32. day:32. adj:$200. num:$3.;
datalines4;
06NOV2016,02NOV2016,IDEA,10001,,,2
07NOV2016,07NOV2016,IDEA,10001,1,OVER,2
14NOV2016,08NOV2016,IDEA,10001,,,3
28NOV2016,15NOV2016,IDEA,10001,,,4
14SEP2016,29NOV2016,IDEA,10001,,,5
;;;;
Can anyone guide me how to get the inc12 dataset attached with input as inc1.
I have made test data for 1 id but they are many id's with different menu.
Any help?
... View more