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

154 data myprint.conractInformations-Sites; set disctool.conractInformations_Sites; run;
-
22
200
ERROR: File DISCTOOL.conractInformations_Sites.DATA does not exist.

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, /, ;,
_DATA_, _LAST_, _NULL_.

ERROR 200-322: The symbol is not recognized and will be ignored.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
options validmemname=extend ;

data myprint.'conractInformations-Sites'n;
 set .........

View solution in original post

6 REPLIES 6
SASKiwi
PROC Star

This is likely to work but why change to non-standard names? You'll end up with a lot of extra typing in your programs:

data myprint.'conractInformations-Sites'n; set disctool.conractInformations_Sites; run;
Dennis_K
Obsidian | Level 7
I'm writing a macro to copy the datasets from the source library. The source dataset name contains dashes.

ScottBass
Rhodochrosite | Level 12

@Dennis_K wrote:
I'm writing a macro to copy the datasets from the source library. The source dataset name contains dashes.


Not in the code/log excerpt you posted.


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
ScottBass
Rhodochrosite | Level 12

154 data myprint.conractInformations-Sites; set disctool.conractInformations_Sites; run;

 

Your source dataset is disctool.conractInformations_Sites, and does not contain a dash.  Does it in fact exist?

 

Because the error message is:

ERROR: File DISCTOOL.conractInformations_Sites.DATA does not exist.

 

That name does not contain a dash, it contains an underscore.

 

Your target dataset is myprint.conractInformations-Sites.  You should have control over that name, since your code is creating the dataset.  Don't use dashes.  Problem solved.

 

 

 

 


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
Ksharp
Super User
options validmemname=extend ;

data myprint.'conractInformations-Sites'n;
 set .........

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 6 replies
  • 4076 views
  • 2 likes
  • 5 in conversation