data temp;
input skill_set : $50. @ ;
--------------
---------------
run;
hi,
what do we mean by the above input statement, what is the meaning of ':' and '@' in the above statement.
The : is used to indicate that the format reading the data starts reading at the next non-blank column until it reaches a blank column in the data. If the : then a format may force reading more characters than you intend when the length of values vary. Note the value of x in the first data set and the error message in the first example step below. Then the behavior with the :
data example; input x $10. y; datalines; short 23 longer 19 ; run; data example2; input x : $10. y; datalines; short 23 longer 19 ; run;
The @ holds the input pointer on the same line. One use is conditionally read data depending on the values of something read before the @ sign.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.