BookmarkSubscribeRSS Feed
srujanmunnaluri
Calcite | Level 5

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

3 REPLIES 3
Kurt_Bremser
Super User

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.

novinosrin
Tourmaline | Level 20

@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

 

Learning SAS® by Example: A Programmer's Guide
Learning SAS® by Example: A Programmer's Guide
In Stock
Publisher: SAS Institute

 

 

Jim_G
Pyrite | Level 9

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2254 views
  • 0 likes
  • 4 in conversation