I will give a picture of the text file that i am working with and the output that coming from my code. I have to read these variables in from the raw data file and use some functions on them. I am having a very hard time reading these file in properly in order for me process the functions on them. The pictures are attached below:
please provide a sample of the SAS code you used to create the second table.
What is the delimiter between the variables? I suspect it's a tab, "09"x.
Try explicitly specifying a delimiter.
Please post your questions as text, not images.
@MarcusX wrote:
I will give a picture of the text file that i am working with and the output that coming from my code. I have to read these variables in from the raw data file and use some functions on them. I am having a very hard time reading these file in properly in order for me process the functions on them. The pictures are attached below:
And with delimited data either use the : format modifier or an informat statement separate from the input statement. Without the : then the input statement is forced to read the specified number of columns such as are resulting in some of your names that are actually shorter than 18 characters to read characters from the next field.
PS: Post code into a code window opened with the forum's {I} icon. It is much easer to copy and paste and then we can show suggestions easier than retyping from an image.
Same with example text files being read. The {I} icon is plain text and will maintain appearance and columns from a text file.
Please can you provide just the first 20 rows of your data (attached the file to the post) and your code, so we can help you with your code to correctly read your data?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.