Hello experts,
Please, I need a solution for the back on-line in text file used by sas under unix.
Exemple
toto.txt(incorrect)
ID name comments
1 Cook treatement
ùR10 Beta45
The correct file will be
ID name comments
1 Cook treatement R10 Beta45
Please, any solution in unix or sas or both ?
the unix command cat -v gives this
1 Cook treatementM^ùR10 Beta45
and the unix command "dos2unix does" not work for me.
Thank you
Hello @LineMoon,
Your question requires more details before experts can help. Can you revise your question to include more information?
Review this checklist:
To edit your original message, select the "blue gear" icon at the top of the message and select Edit Message. From there you can adjust the title and add more details to the body of the message. Or, simply reply to this message with any additional information you can supply.
SAS experts are eager to help -- help them by providing as much detail as you can.
This prewritten response was triggered for you by fellow SAS Support Communities member @Reeza
.Is this related to reading in a text file? If so show the code you attempted and example lines from the text file. Post code and example data in code box opened using the {I} icon. In a text file use of the code box is critical to retain plain text formatting. Otherwise lines shown could be quite different than the source.
The original source of the data may also be an issue as we should know whether your system is Unix or the source file originated on a Unix platform. If your system is Unix and the file is from a Mac or Windows system you may need to tell your program which line terminator to use when reading the file as the different operating systems use different ways to indicate the end of a line. The SAS INFILE option TERMSTR often helps.
@ballardw: Thank you very much.
Yes, it is related to reading a text file.
As you know, it is indpendant of code, it is really a data problem
I must have this data input
ID name comments
1 Cook treatement R10 Beta45
With this matter, I will have
ID name comments
1 Cook treatement
ùR10 Beta45
I think some unix commands can resolve the problem( my sas is under unix)
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.