please give me the explain, Thank you.
Since YEARS_SERVICE = 1 ("the employee has been with the company one year")
then AMOUNT=0.
Calculating AMOUNT_PER_YEAR involves division by AMOUNT.
Division by zero yields missing value (answer D)
Since YEARS_SERVICE = 1 ("the employee has been with the company one year")
then AMOUNT=0.
Calculating AMOUNT_PER_YEAR involves division by AMOUNT.
Division by zero yields missing value (answer D)
Thank you .
Type code that does something similar using the values in the question.
Look at the log.
3 data example; 4 x=0; 5 y=5; 6 z= y/x; 7 run; NOTE: Division by zero detected at line 6 column 8. x=0 y=5 z=. _ERROR_=1 _N_=1 NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to missing values. Each place is given by: (Number of times) at (Line):(Column). 1 at 6:8 NOTE: The data set WORK.EXAMPLE has 1 observations and 3 variables.
X here is substituted for "amount", Y is "years_service".
Thank you for your help.
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.