Dear Statalist users

I need help turning a wide file into a long file, however, I'm having some difficulty as there is no wave identifier variable and the wave identifying part in the variable is the second letter in the variable - LCFA005A = C is wave 3, LDFA005A = D is wave 4.

How do I convert it successfully into a long file with a wave identifier?

Any help would be appreciated

Best
Brendan

Code:
* Example generated by -dataex-. To install: ssc    install    dataex
clear
input double(LSAYID LCFA005A LDFA005A)
24852 . .
24854 . 0
24855 . .
24857 . .
24858 . .
24860 . .
24861 . .
24864 . .
24865 . .
24866 . .
24868 . .
24869 . .
24870 . .
24872 . .
24873 . .
24875 . .
24876 . .
24880 . .
24881 . .
24883 . .
24884 . .
24885 . .
24889 . .
24890 . .
24891 . .
24892 . .
24893 . .
24894 . .
24895 . 1
24896 . .
24897 . .
24898 . .
24899 . .
24901 . .
24902 . .
24903 . .
24904 . .
24906 . .
24908 . .
24909 . 1
24910 . .
24911 . .
24912 . .
24913 . .
24914 . .
24915 . .
24916 . .
24917 . .
24918 . .
24919 . .
24920 . .
24921 . .
24923 . .
24924 . .
24925 . .
24926 . .
24927 . .
24930 . .
24932 . .
24933 . .
24936 . .
24938 . .
24943 . .
24945 . .
24949 . 0
24952 . .
24954 . 0
24956 . .
24957 . .
24959 . .
24962 . .
24963 . .
24964 . .
24968 . .
24969 . .
24970 . .
24973 . .
24974 . 1
24975 . .
24977 . .
24979 . .
24980 . .
24981 . .
24984 . .
24986 . .
24987 . .
24989 . .
24990 . .
24995 . .
24996 . .
24998 . .
24999 . .
25000 . .
25003 . .
25004 . .
25005 . .
25009 . .
25010 . .
25012 . .
25013 . .
end
label values LCFA005A LCFA005A
label values LDFA005A LDFA005A
label def LDFA005A 0 "0 Not applicable", modify
label def LDFA005A 1 "1 Applicable", modify