data samp ;
input id date :ddmmyy10. age$ 2.;
cards;
102 12/11/198312
103 12/11/198914
;
run;
whenever i place colon modifier before a informat, it is reading a column larger than specified width in character variables and more than that in numeric... .please clarify how sas intrepets colon modifier..
This is the same only different. SAS is ignoring the width specification on the numeric informat. If you want to read the data properly use formatted input for both date and age. Remove the colon.
This is the same only different. SAS is ignoring the width specification on the numeric informat. If you want to read the data properly use formatted input for both date and age. Remove the colon.
Thanks for clarifying me....i have just one more doubt.....u said that first it reads the data till the delimiter then truncates it...will it read the data into PDV and truncate afterwards? how the processing happens?
In the other example there is truncation because $10 defines the length of the otherwise undeclared character variable. The input statement with :$10. reads until the delimiter is found with is demonstrated by the COLUMN position. Truncation occurs when the character string is stored or written to the PDV (I suppose is a good enough way to describe it).
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.