BookmarkSubscribeRSS Feed
karthikeyan_S
Calcite | Level 5
Hi,
I have a dataset.If i have null value in the dataset then i need to output it .
The problem is it shuld be done without knowing the coloumn names or to put in simple terms it shuld be generic so that i can use it for any dataset i want.

pls provide inputs .

Thanks & Regards
KAKA Message was edited by: kaka
3 REPLIES 3
data_null__
Jade | Level 19
You should be able to find several references to this problem in the archive.

If you have 9.2 look at CMISS and NMISS functions.

If you don't have 9.2 look at coalesceC and NMISS

Also the "SAS Variable List" specifically _NUMERIC_ and _CHARACTER_
karthikeyan_S
Calcite | Level 5
Sir Thanks for ur reply .
The NMISS just returns the count and CMISS is not ter in 9.1.3.
The coalesceC function is used to list hte first non missing value
I need to ouput that record to a file if i find a null in any of the coloumns.
could u pls help me out .
Cynthia_sas
SAS Super FREQ
Hi:
This previous forum posting contains a link to the SAS documentation which talks about the difference between SAS missing values and NULL values, such as used by an RDBMS:
http://support.sas.com/forums/thread.jspa?messageID=24688恰

In order for anyone to help you with more than hints (such as NMISS or MISSING), you need to provide more information, such as:
1) What operating system are you using (Windows, Unix, mainframe, etc)

2) What version of SAS are you using (SAS 8.2, 9.1.3, 9.2)

3) What type of data are you accessing (data is in RDBMS (which one), data is in "flat" file and being read into SAS, data is in SAS datasets, data is in CSV or other format file)

4) HOW are you planning to read your data into SAS (PROC IMPORT, SET statement, DATA step program with INFILE/INPUT)

5) What type of data are you reading?? All character, all numeric, mix of character and numeric (and a brief description of the data would be useful) And, do you want to test for SAS MISSING values in each variable value or do you want to test for NULL values, as described in the documentation link above for RDBMS tables??

6) What is the logic of the process that should take place?
For example -- need to test each variable and when the first missing or null value is found, stop testing and immediately output the whole observation; or need to test each variable and when the first missing or null value is found, keep testing all the variables and then output the observation if there were ANY missing values in ANY observation.

7) What is your desired output?? A "flat file", a CSV file, a report, a SAS dataset???

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1247 views
  • 0 likes
  • 3 in conversation