I need to dvelop a code to read a dataste that contains both icd-9 and 10 codes. Any reference for me to read?
Use SAS or powershell to extract a smaller sunset into a text file and examine this in Excel.
You should be reading and storing both ICD9 and ICD10 as character fields so you need to change the length of the field possibly but besides that there should be no issue.
Without seeing anything else ... no.
Post your code, log and sample data.
Check your input statement - is it missover truncover flowover? Which is appropriate for your situation?
This article contains information on the Lost Card note.
http://www2.sas.com/proceedings/sugi30/058-30.pdf
Thanks. I have read this before.
truncover
I added truncover option. No more "loss card" but still almost all missing data, execpt the first 2-7 variavles, the first one is also blank
Should I change Irecl?
The log shows The minimum record length was 256.
I also added firstobs=2 because I only want to test it, without waiting for it to finish the whole records,
it still reads all records
can anyone tell how to fix it
missover truncover obs=2;
I did use this and it only read two records, but most info was missing except the first 2-7 variables
most missing data, what should I do
I chaged the
lrecl to the maximum value but now it only reads most variables but still many values are missing. Any suggestions.
Guessing is a waste of everyone's time.
Post your code, log and sample data.
run;
20k is the length of the record. Your last input variable starts well before that so that's why your missing variables.
Use truncover.
Fix your input statement.
This all assumes you have a fixed width file.
Use the following to subset your file so you can debug it. Extract 20 lines and make sure your input statement is correct.
Thanks.
I have used truncover, it does not change.
I cannot open the link. doe it need to register?
I cannot understand how to fix it. I still do not understand why it is "20,000" and do not understand "Your last input variable starts well before that so that's why your missing variables"
SAS is saying a record length is 20,000 characters/columns. You've set it to the 32K characters but that doesn't matter if there's nothing beyond this.
Your last input variable starts at column 13456. I'm assuming you have a specification document, what does that say regarding length and variables?
The code was for Powershell, a script command to extract top N lines.
gc -path file_name.csv - head N > output.txt
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.