@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).
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.