Dear Andrew,
thanks again. I tried the following but do not understand why now it is returning a syntax error:
Thanks for your support and guidance. I really need this to work. Thanks again
**************
. local n: word count `V'
. local first: word 1 of `V'
. local last: word `n' of `V'
. di "`first'" " " "`last'"
18087 DE000EH094Y1 21272 IT0005283491 [
. foreach v in `V'{
2. gen `v' = regexm(V1D1, "`v'")
3. }
18087 invalid name
r(198);
end of do-file
r(198);
18087 invalid name - this comes from the combination of dates and isin: 18087 in effect is a transformed date from numeric to string to facilitate the match with isin which is also string
egen VADA = concat(Valuedate isin), decode p(" ")
Now the data looks like this:
V1D1 VADA
AT0000136213 17897 18087 XS0250267647
AT0000136288 17897 18087 DE000EH094Y1
AT0000136312 17897 18087 ES0413770019
AT0000137088 17520 18087 XS0250267647
AT0000137088 17129 18088 ES0414840274
AT0000137088 17402 18088 XS0286031777
AT0000137088 17647 18088 ES0347858005
AT0000137088 17804 18088 ES0413790009
AT0000137088 17897 18091 ES0347859003
AT0000137088 16765 18091 XS0250267647
AT0000137203 17897 18091 FR0010770529
thanks again. I tried the following but do not understand why now it is returning a syntax error:
Thanks for your support and guidance. I really need this to work. Thanks again
**************
. local n: word count `V'
. local first: word 1 of `V'
. local last: word `n' of `V'
. di "`first'" " " "`last'"
18087 DE000EH094Y1 21272 IT0005283491 [
. foreach v in `V'{
2. gen `v' = regexm(V1D1, "`v'")
3. }
18087 invalid name
r(198);
end of do-file
r(198);
18087 invalid name - this comes from the combination of dates and isin: 18087 in effect is a transformed date from numeric to string to facilitate the match with isin which is also string
egen VADA = concat(Valuedate isin), decode p(" ")
Now the data looks like this:
V1D1 VADA
AT0000136213 17897 18087 XS0250267647
AT0000136288 17897 18087 DE000EH094Y1
AT0000136312 17897 18087 ES0413770019
AT0000137088 17520 18087 XS0250267647
AT0000137088 17129 18088 ES0414840274
AT0000137088 17402 18088 XS0286031777
AT0000137088 17647 18088 ES0347858005
AT0000137088 17804 18088 ES0413790009
AT0000137088 17897 18091 ES0347859003
AT0000137088 16765 18091 XS0250267647
AT0000137203 17897 18091 FR0010770529
Comment