@PA8 wrote:
I tried the suggested code but got the "Missing values were generated error" message :
MPRINT(STRIP_DT): data auxo52 strip.auxo5; SYMBOLGEN: Macro variable DS resolves to auxo5 MPRINT(STRIP_DT): set auxo51; SYMBOLGEN: Macro variable OUT resolves to AUDAT_ SYMBOLGEN: Macro variable MM resolves to AUDAT_MM SYMBOLGEN: Macro variable DD resolves to AUDAT_DD SYMBOLGEN: Macro variable YY resolves to AUDAT_YYYY MPRINT(STRIP_DT): AUDAT_=mdy(max(AUDAT_MM,1),max(AUDAT_DD,1),AUDAT_YYYY); SYMBOLGEN: Macro variable OUT resolves to AUDAT_ MPRINT(STRIP_DT): format AUDAT_ yymmdd10.; SYMBOLGEN: Macro variable OUT resolves to AUDAT_ MPRINT(STRIP_DT): if 0 < AUDAT_ <= '01NOV2019'd ; SYMBOLGEN: Macro variable OUT resolves to AUDAT_ MPRINT(STRIP_DT): drop AUDAT_; MPRINT(STRIP_DT): run; NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 6 at 23186:116 NOTE: There were 3354 observations read from the data set WORK.AUXO51. NOTE: The data set WORK.AUXO52 has 1986 observations and 44 variables. NOTE: Compressing data set WORK.AUXO52 decreased size by 92.00 percent. Compressed is 4 pages; un-compressed would require 50 pages. NOTE: The data set STRIP.AUXO5 has 1986 observations and 44 variables. NOTE: Compressing data set STRIP.AUXO5 decreased size by 92.00 percent. Compressed is 4 pages; un-compressed would require 50 pages. NOTE: DATA statement used (Total process time): real time 0.09 seconds user cpu time 0.04 seconds system cpu time 0.03 seconds memory 1899.62k OS Memory 54004.00k Timestamp 02/06/2020 07:53:18 PM Step Count 1204 Switch Count 0
6 out of 3354 input records => data values likely the issue.
I would add something like
if missing(Audat_) then put "ERROR: Record=" _n_ +1 &mm= +1 &dd= +1 &yy=;
to the code to get diagnostics which will tell you which observation of the source data set has the data value problem(s).
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.