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.
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 save with the early bird rate—just $795!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.