Hello,
I have Data like this

input double id str6 V1 long V2 long V3
1 "A" 20180103 20180830
2 "B" 20160409 20161218
end

where V2(aaaammdd) is the starting date and V3(aaaammdd) is the end date.
Using these two variables I want to construct a data like this

input double id str6 V1 long V2 long V3 long V4
1 "A" 20180103 20180830 201801
1 "A" 20180103 20180830 201802
1 "A" 20180103 20180830 201803
1 "A" 20180103 20180830 201804
1 "A" 20180103 20180830 201805
1 "A" 20180103 20180830 201806
1 "A" 20180103 20180830 201807
1 "A" 20180103 20180830 201808
2 "B" 20160409 20161218 201604
2 "B" 20160409 20161218 201605
2 "B" 20160409 20161218 201606
2 "B" 20160409 20161218 201607
2 "B" 20160409 20161218 201608
2 "B" 20160409 20161218 201609
2 "B" 20160409 20161218 201610
2 "B" 20160409 20161218 201611
2 "B" 20160409 20161218 201612
end

where V4(aaaamm) is extract from V2 and V3.

Thank you for your patience and I am looking forward to your feedback.