I am writing a Cobol program in Visual Studio Code using the STRING and UNSTRING statements but for some reason when trying to use string functions on email addresses the Cobol program will not function properly with the @ symbol. The file with the email addresses is a text file with encoding UTF 8. The open editor is also using UTF 8. I have been working on this for quite some time No matter what I do it just does not work, I don't know if I need special compiler options or environment variables I just don't know. I do remember something like this years ago when I was on MVS But that was a EBCDIC verse ASCII issue And after all of this time I do not remember what I did to address it. Has anyone had this happen in VS code and found a solution.
I debugged the data To look at the results of each line of code After execution to verify that the program is not functioning properly.
inspect input-rec tallying char-count
FOR CHARACTERS before '@'.
display char-count.
UNSTRING input-rec delimited by DELIM
into email-userid
email-provider
end-unstring
DISPLAY email-addr
display input-rec.