BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi guys ,

I want to know more details about _NULL_.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi,
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.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 1 reply
  • 885 views
  • 0 likes
  • 2 in conversation