Hi all,
I saw many program that have format ??format. Used in input, put, .... I can not find any reference of why they use '??'. Could anyone explain me a little bit or give me some references to read.
Thank you very much,
Abdu
*(??) modifiers that suppress the printing of both the error messages and the input lines when invalid data values are read.
data have;
input EmployeeID $;
datalines;
12
12
ab
9
13
;
/* With error message */
data want;
set have;
eid=input(EmployeeID, 2.);
run;
/* Without error message */
data want;
set have;
eid=input(EmployeeID, ??best.);
run;
*(??) modifiers that suppress the printing of both the error messages and the input lines when invalid data values are read.
data have;
input EmployeeID $;
datalines;
12
12
ab
9
13
;
/* With error message */
data want;
set have;
eid=input(EmployeeID, 2.);
run;
/* Without error message */
data want;
set have;
eid=input(EmployeeID, ??best.);
run;
But in this way, we will lost some data issue information. That is really not a good way to use this modifier. Any good reason to use this modifier?
if the format does not match the data elements you are reading, you are losing them anyway, unless you change the format to some universal char. ?? is merely to suppress the error message in the log.
Haikuo
But in Clinical field, we need to catch these information. This might be a typo, or program flaw, we absolutely need to fix that, not just suppress the error message. You are right, maybe in the other field, that information is not important.
We are deviating the discussion from the original path that you set. You were asking what "??" do, and I think you have your answer. If you now are trying to ask how to read in certain data intact, then you probably want to show us some sample data, and for the better, to initiate a brand new discussion. But in general like I mentioned you would need the informats for character instead of number (such as the one you put up for example "best.").
Regards,
Haikuo
Check the doc for the INPUT statement, search for "How Invalid Data Is Handled" it will explain about the ? and ??
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.