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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 4211 views
  • 2 likes
  • 5 in conversation