BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Danglytics
Calcite | Level 5

Hi,

What i'm trying to do is to stack 3 different datasets with the exact same structure using macros to identify the files by a timestamp for each of the datasets.

I'm unsure why i'm getting an error with the code below:

%LET CUR_MONTH=2012FEB29;

%LET PREV_MONTH=2012JAN31 ;

%LET PREV_MONTH2=2011DEC31

DATA RATED.RATEDEVENT_L3MTH_STACK_&CUR_MONTH ;

SET RATED.RATED_EVENT_&CUR_MONTH

RATED.RATED_EVENT_&PREV_MONTH

RATED.RATED_EVENT_&PREV_MONTH2;

RUN ;

ERROR: File WORK.GOPTIONS.DATA does not exist.

ERROR: File WORK.NOACCESSIBLE.DATA does not exist.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set RATED.RATEDEVENT_L3MTH_STACK_2012FEB29 may be incomplete.  When this step was

         stopped there were 0 observations and 10 variables.

WARNING: Data set RATED.RATEDEVENT_L3MTH_STACK_2012FEB29 was not replaced because this step was

         stopped.

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Danglytics,

You're getting an error message because you're working too hard and getting bleary-eyed.

The third %LET statement is missing a semicolon.

Good luck.

View solution in original post

3 REPLIES 3
Hima
Obsidian | Level 7

How are these data sets related to the code?

WORK.GOPTIONS.DATA

WORK.NOACCESSIBLE.DATA

Linlin
Lapis Lazuli | Level 10

/* you missed a ";" */

%LET PREV_MONTH2=2011DEC31

Astounding
PROC Star

Danglytics,

You're getting an error message because you're working too hard and getting bleary-eyed.

The third %LET statement is missing a semicolon.

Good luck.

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1868 views
  • 3 likes
  • 4 in conversation