View previous topic :: View next topic
|
Author |
Message |
sabarikanth
New User
Joined: 07 Jun 2010 Posts: 59 Location: coimbatore
|
|
|
|
Hi All,
I have a SAS code and this program has some logical error. Do I have a option similar to "DISPLAY statement in Cobol" to view a variable's value in SAS.
If so please let me know the syntax for it. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
First, i don't really "do" SAS. . . That being said:
One way could be to write this to a file, assign the dd statement to sysout, and view it in the queued output. Others will give more/better replies, but this may get you moving. |
|
Back to top |
|
|
bodatrinadh
Active User
Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
Hello,
Use PUT <Var Name> command.
if you are using very limited number of records (Say 100 Observations),
You can use PROC PRINT DATA=<Dataset Name >; ==> It displays all the Variable names and its values in a particular dataset.
Suggested not to use PROC PRINT if you are using full volume.
Thanks
-3nadh |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
PUT _ALL_; |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Adding to PUT statement for data step,
If the program has macro statements then the equivalent is %PUT. There are also debugging options like
OPTIONS SYMBOLGEN MPRINT MLOGIC MACROGEN;
which can be used for debugging. |
|
Back to top |
|
|
|