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.

CFC_SAS_Communities_400x225.jpgCFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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
  • 3321 views
  • 0 likes
  • 4 in conversation