DATA EXPER;
INPUT TIME0-TIME4;
DATALINES;
100 200 300 400 500
55 110 130 150 170
;
DATA Minutes;
SET EXPER;
ARRAY TIME[0:4] TIME0 – TIME4;
DO I= 0 TO 4;
TIME[I]= ROUND(TIME[I]/60,.1);
END;
DROP I;
RUN;
PROC PRINT DATA=MINUTES NOOBS;
TITLE “LISTING OF Data set Minutes”;
run;
I keep getting the same error regardless if i change the number of variables.
'Too few variables defined for the dimension(s) specified for the array '- is the error I keep getting. Does anyone have any suggestions as what could be wrong in the code?
When I pasted your code into my editor this line
ARRAY TIME[0:4] TIME0 – TIME4;
shows the dash like characer as a box drawing character.
Try retyping the dash with the one on your keyboard.
This kind of character change happens when copying from documents that are not plain text such as Word, which will "helpfully" change some characters.
When I pasted your code into my editor this line
ARRAY TIME[0:4] TIME0 – TIME4;
shows the dash like characer as a box drawing character.
Try retyping the dash with the one on your keyboard.
This kind of character change happens when copying from documents that are not plain text such as Word, which will "helpfully" change some characters.
Thank you!
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.