Hi All,
Can anyone one suggest me when to use the stmt put all and put_all in which scenarios.
I am a beginner. Kindly let me know.
Regards
Srujan
I suggest you first consult the documentation: http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#n1spe7nmkmi7ywn..., and then come back here to clarify details, if needed. Your question as such is answered in "Details - When to use PUT".
PS note that the link is the first result of a google search for "sas put statement". This is usually the best way to find pertinent SAS documentation.
@Kurt_Bremser rightly said and I would like to recommend Ron Cody's book which is very helpful
https://www.sas.com/store/prodBK_60864_en.html?storeCode=SAS_US&storeCode=SAS_US
Your normal SAS program will read a file and output data to the printer or results window. In many files you will run across a record (observation) that doesn't print right or something is strange in the data from that record. Say its the 101th record, you will want to code If _n_=101 then put _all_; This will show all your fields with their field names in the log for you to debug. You can also code If name="Degeneras" then _error_; This will show the raw data record as well as the fields and field names.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.