Hi Guys

Posts: 0

Hi Guys

Hi guys ,

I want to know more details about _NULL_.
Posts: 8,719

Re: Hi Guys

I guess you mean you want to know about the kind of DATA step program where it starts:
[pre]DATA _NULL_;[/pre]

This type of program is generally written because you want to use the SAS programming language but you do not want to create a SAS dataset (which would be done with this syntax: [pre] DATA NEWFILE;[/pre]

The scenarios in which you would want to use the programming language, but not create an output SAS dataset, are many. A few of them are:
1) you want to write to FILE PRINT or FILE PRINT ODS with PUT statements;
2) you are writing to some other type of file (ASCII text) using PUT statements;
3) you need to use CALL SYMPUT to create macro variables from a SAS dataset, but you do not need to otherwise "process" the data set or create a new one.

There are many user group papers written on the subject of DATA step processing and DATA _NULL_ in particular. There is no better resource that I can think of than the documentation and examples of the DATA step in the SAS help files. Tech Support has many examples of DATA step programming. The SAS Macro reference documentation has many examples of #3.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation