Hi All!,

I am facing a problem with nsso data while merging four files such as household, demographic, principal status, and subsidiary status into one where two files are having the same number of digits in the key variable (eg:20000110102) and the other two files having the same digits in the key variable (eg:1120000110102). I want to exclude the first two digits (i.e.11) from 1120000110102 to have the same values in all four files. I have gone through some of statalist posts that deal with string variable but mine are numerical formats. In that case, the command [gen newvar=substr(varname,#,#)] will not work, hence how can I do it. Kindly help me.

Thanking you in advance.